Machsupport Forum
Mach Discussion => Mach4 General Discussion => Mach4 Videos => Topic started by: DazTheGas on September 20, 2018, 06:35:38 PM
-
Ever wondered how the Screen Timer Script works
https://youtu.be/wNPMqjkcJ_8
Code used in video
if timer == 0 then
timer0()
elseif timer == 1 then
timer1()
elseif timer == 2 then
timer2()
elseif timer == 3 then
timer3()
elseif timer == 4 then
timer4()
elseif timer == 5 then
timer5()
elseif timer == 6 then
timer6()
elseif timer == 7 then
timer7()
elseif timer == 8 then
timer8()
elseif timer == 9 then
timer9()
else
mc.mcCntlSetLastError(inst, 'Timer Number Out Of Range')
end
function timer0()
local col = scr.GetProperty('btnMachCoord','Bg Color')
if col == '' then
scr.SetProperty('btnMachCoord','Bg Color','#00FF00')
else
scr.SetProperty('btnMachCoord','Bg Color','')
end
end
function timer1()
wx.wxMessageBox('I came from a Timer 1')
end
Enjoy
DazTheGas