Page 1 of 1

Progress Bar help!

Posted: Mon Dec 02, 2013 10:48 pm
by acwilson96
I am trying to use a progress bar to count down from 30 seconds so the bar will start full then empty over 30 seconds, here is my code:

Code: Select all

on progressStart
   repeat with progressNumber = 1 to 1800
      set thumbPos scrollbar userAnswerScrollbar to (1800 -progressNumber)
   end repeat
   call recordAnswer
end progressStart
//60 ticks per second, 60*30=1800
Also is there any way I can type or use buttons whilst the progress bar is running?

All help appreciated!

Re: Progress Bar help!

Posted: Tue Dec 03, 2013 1:49 am
by Simon
Hi acwilson96,
I'm interested in what made you think a repeat loop had anything to do with ticks? OK, maybe code runs on tick cycles? (oh that's not it btw)

I've got an answer, but see if you can figure out how to do this without using a repeat loop but using "send" instead.
See if this helps you get going;

Code: Select all

 send "progressStart" to me in 1 tick
If you need more help just ask.

Simon