Timer

Domi mcdomi at free.fr
Fri Dec 14 08:04:01 EST 2001


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 handler in the button:

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 mouseup

The problem: it seems that the loop send all the commands at once, 
and doesn't "wait" for the 1 second delay...
-- 
Regards,
Dominique



More information about the metacard mailing list