Here is the current list of working (and recommended) scr.calls...
NOTE: The Button click, down, up, and mdiexe calls do work but they have all been
replaced by newer/better ways to get-to/do those things. So, those calls are NOT shown here.
You can place this code into you lua scripter and put a stop debug break point on each line,
to see how it works and you can mouse over the returned values.
function test()
local mInst = 0;
local inst = mc.mcGetInstance(mInst);
local NumValue = 0;
local StringValue = "";
local BoolValue = false;
--Goto a Page, ("Default" in the wxMach set is the only page at this time),
--it is considered page "0", all after that would be 1, ...
scr.ShowPage("Default");--"PageName"
--Get the Button Up color property, i.e. "Green"(hex value) of the enable button
StringValue = scr.GetProperty("tbutton2", "Button Color Up");--"ControlName", "PropertyName"
--Set the blink rate of the up state of enable button to 250
scr.SetProperty("tbutton2", "Blink Rate Up", "250");--"ControlName", "PropertyName", "Value"
--Set the blink rate of the up state of enable button back to 500
scr.SetProperty("tbutton2", "Blink Rate Up", "500");--"ControlName", "PropertyName", "Value"
--Get the current "Page" number that your on 0 to ##
StringValue = scr.GetCurrentPage();--no param
--Does the named control exist in the set (True)?
BoolValue = scr.IsControl("tbutton2");--"ControlName"
--Does the Property of the named control exist (false)?
BoolValue = scr.IsProperty("tbutton2", "CrashAll");--"ControlName", "PropertyName"
--[[
NOTE: scr.ButtonClick, ButtonDown, ButtonUp, ExecMdi; These calls STILL work, BUT!!!! Steve says that
they are the MUCH outdated and older way, and ONLY kept for compatibility for some dark age Mach4 screens.....
These types of functions have all been replaced by mc.calls, or get/set properties... in other words
Use the newer, easier to use stuff!!!
--]]
end
if (mc.mcInEditor() == 1) then
test();
end
PS. Thanks to Steve Murphy, for the heads up on the old stuff!! And help in general,
Scott