Page 1 of 1

How can I use the "return" in a Timer. - New Question

Posted: Sun May 17, 2015 9:15 pm
by L.Coder
Hello, I´m working on two timers.

the first timer count down 30 seconds and the other count down 20 seconds. First starts the timer 1, when it finish starts the other.
I want to make a button where you can select the number of times that you want to the timers repeat that process.

How can i do that?

I did this but is not working, the timer does not count:

Code: Select all

 
on mouse up 

put 4 into RepeatT

end mouse up

Code: Select all


on mouseUp
   
  repeat RepeatT times
   put 20 into CountTimer
   put 10 into CountRest
   put CountTimer into fld "tCount1"
   put CountRest into fld "tCount2"
   
   send "UpdateTimer" to me in 1 second
end repeat

end mouse up

Re: How can I use the "return" in a Timer. - New Question

Posted: Thu Aug 20, 2015 8:42 pm
by Pistris
where you able to resolve this?

is the RepeatT variable global?
if not, you the variable has empty value everytime mouseup handler is called

plus the handler is called mouseup not mouse up

edd.