Is there a way to execute code that is stored in a string in AMS?
Currently I can write the string to a file and then run the file like:
or I can assign it to a hotspot and then execute the on click event like:Code:myScript="Debug.ShowWindow(true);Debug.Print('Hello World');" myLocation="C:\\MyFile.lua" TextFile.WriteFromString(myLocation, myScript, false); Application.RunScriptFile(myLocation);
Is it possible to just do some type of eval(myScript)?Code:myOtherScript="Debug.ShowWindow(true);Debug.Print('Goodbye World');" Page.SetObjectScript("MyHotspot", "On Click", myOtherScript); Page.ClickObject("MyHotspot");
This would be used with pulling scripts from a MYSQL/SQLLITE DB and then executing them. They would all be valid Lua Scripts.

Reply With Quote
