Phil Davis ecrivait / wrote:
To accomplish your goal without using wait, and using your existing
approach, you could give each sent message a different release time,
like this:
put 10 into field temps
repeat with x = 1 to 10
send mouseup to field temps in x seconds
end repeat
I want to rewrite a little timer I had in HC -- without resorting to
wait or idle which are not recommended in MC...
So, I have a button which starts the timer, and a numeric field which
the seconds remaining.
My goal is to show the seconds, for instance from 10 down to 0.
I wrote a loop
Hi Domi,
I want to rewrite a little timer I had in HC -- without resorting to
wait or idle which are not recommended in MC...
...
put 10 into field temps
repeat 10 times
send mouseup to field temps in 1 second
end repeat
The field script:
on mouseup
subtract 1 from me
end
Klaus Major ecrivait / wrote:
This sends the message every 1 second until the content of fld temps
is 0, which means the timer did his work :-)
It is very neat a solution, indeed :-)
Thus, the answer was not a loop but a self-calling recursive function!
--
Regards,
Dominique
Hi Dominique,
I want to rewrite a little timer I had in HC -- without resorting to
wait or idle which are not recommended in MC...
So, I have a button which starts the timer, and a numeric field which
the seconds remaining.
My goal is to show the seconds, for instance from 10 down to 0