Button trick?
Posted: Fri Aug 15, 2008 7:59 am
I want to have a button which I can set
to "Auto On" and "Auto Off" to run a script
automatically if the user wishes.
So need a way to get out of a repeat loop
when the label of the button is "Auto On"
and is clicked.
Have so far this - which of course doesn't
exit the loop.
This, of course, goes on for ever which
isn't what I want.
Expect it's something to do with messages
which I know nothing about - yet.
to "Auto On" and "Auto Off" to run a script
automatically if the user wishes.
So need a way to get out of a repeat loop
when the label of the button is "Auto On"
and is clicked.
Have so far this - which of course doesn't
exit the loop.
Code: Select all
on mouseUp
if the label of me is "Auto Off" then
set the label of me to "Auto On"
end if
if the label of me is "Auto On" then
repeat while label of me is "Auto On"
send "mouseUp" to button btnNextNumber
wait 1 sec
end repeat
end if
end mouseUp
isn't what I want.
Expect it's something to do with messages
which I know nothing about - yet.