Time Counter

Signe Marie Sanne Signe.Sanne at roman.uib.no
Tue Feb 22 06:35:37 EST 2005


Malte Brill skrev:

> Hi Signe,
> 
> you might try this script (which can be adapted to split out hours too):
> 
> on mouseUp
>   set the istimer of me to 0
>   if the flag of me is empty then set the flag of me to -1
>   set the flag of me to the flag of me*-1
>   if the flag of me=1 then startMyTimer
> end mouseUp
> 
> on startMyTimer
>   set the isTimer of me to the isTimer of me+1
>   put the isTimer of me div 60 into myMinutes
>   if myMinutes<10 then put "0"&myMinutes into myMinutes
>   put the isTimer of me mod 60 into mySeconds
>   if mySeconds<10 then put "0"&mySeconds into mySeconds
>   put myminutes&":"&myseconds
>   if the flag of me=1 then send startMyTimer to me in 1 second
> 
> end startMyTimer

Hello Malte
Thanks for the script, but there must be something missing. It does not show 
the time elapsed. Only when I click the button does it change. What is missing?
Signe Marie


More information about the use-livecode mailing list