Economy-x-Talk - Sample Scripts
Cond'l Idle B&W Indicator
Not a very good conditional idle handler, but a nice indicator.
on idle
global gAction
if hilite of cd btn "Turn Off" is true then exit idle
if gAction is empty then exit idle
if gAction is "either" then doHiliteEither
if gAction is "cmd" then doHiliteCmd
if gAction is "chr" then doHiliteChr
pass idle
end idle
on toggleIdle
global gAction,gBnum
if gBnum is not empty then
beep gBnum
end if
if gAction is empty then
put "either" into gAction
exit toggleIdle
end if
if gAction is "chr" or gAction is "cmd" then
clearHilite
wait 120
put empty into gAction
exit toggleIdle
end if
if the hilite of cd btn 3 is true then
clearHilite
wait 120
put "chr" into gAction
exit toggleIdle
end if
if the hilite of cd btn 1 is true then
clearHilite
wait 120
put "cmd" into gAction
exit toggleIdle
end if
end toggleIdle
on doHiliteEither
if the hilite of cd btn 1 is false and the hilite of cd btn 2 is false
then
clearHilite
wait 5
set the hilite of cd btn 1 to true
set the hilite of cd btn 2 to true
set the hilite of cd btn 3 to false
set the hilite of cd btn 4 to false
else
clearHilite
wait 5
set the hilite of cd btn 1 to false
set the hilite of cd btn 2 to false
set the hilite of cd btn 3 to true
set the hilite of cd btn 4 to true
end if
wait 120
end doHiliteEither
on doHiliteCmd
global gBnum
if the hilite of cd btn 1 is false then
clearHilite
wait 5
put 1 into gBnum
set the hilite of cd btn 1 to true
set the hilite of cd btn 2 to false
else
clearHilite
wait 5
put 2 into gBnum
set the hilite of cd btn 2 to true
set the hilite of cd btn 1 to false
end if
wait 120
end doHiliteCmd
on doHiliteChr
global gBnum
if the hilite of cd btn 3 is false then
clearHilite
wait 5
put 3 into gBnum
set the hilite of cd btn 3 to true
set the hilite of cd btn 4 to false
else
clearHilite
wait 5
put 4 into gBnum
set the hilite of cd btn 4 to true
set the hilite of cd btn 3 to false
end if
wait 120
end doHiliteChr
on clearHilite
global gBnum
set the hilite of cd btn 1 to false
set the hilite of cd btn 2 to false
set the hilite of cd btn 3 to false
set the hilite of cd btn 4 to false
put empty into gBnum
end clearHilite
on closeCard
global gAction
clearHilite
put empty into gAction
end closeCard
Keep this extensive resource of tutorials and samples on-line! Support RunRev.info!
| Yes, this script is useful. I make a donation and choose freely how much I want to donate on-line (PayPal). Click here if you want to make a donation in dollars. | This script has not (completely) solved my problem and I want Economy-x-Talk to take care of it. Let me contact you. |
Copyright©2002-2008 by Mark Schonewille, Nijmegen, the Netherlands. This web site is in no way affiliated with Runtime Revolution Ltd., but we do recommend the Revolution development platform.