The net does not have our API calls. The documentation is in progress but it is a LOT of slow tedious work.
Here is a quick look at the screen API call available to LUA inside the Mach4GUI:
(All functions return a result code as their first return value. 0 == success)
number scr.ShowPage(string pageName); -- Show a screen page by name.
number, string scr.GetProperty(string ctrlName, string propName); -- Get a control's property value.
number scr.SetProperty(string NctrlName, string propame, string value); -- Set a control's property value.
number scr.ExecMdi(string ctrlName); -- Execute the contents of a named MDI control.
number, number scr.GetCurrentPage(); -- Get the current page.
number, number scr.IsControl(string ctrlName); -- Is this a valid control?
number, number scr.IsProperty(string ctrlName, string propName); -- Is this a valid control and property combination?
number scr.ButtonClick(string ctrlName); -- Simulate a button click event.
number scr.ButtonUp(string ctrlName); -- Simulate a button up event.
number scr.ButtonDown(string ctrlName); -- Simulate a button down event.
A word of warning... DO NOT use loops in the PLC script. It is a script that is designed to be executed like a PLC; top down. The frequency of the script can be set in the screen set properties. There is a lot of power here. But with power comes great responsibility because it has the ability to completely ruin your day if you are careless! There is nothing preventing you from adding loops or setting the PLC script to run every 1 millisecond. It will happily let you do these things with a smile. So be careful!
Steve