Would anyone out there tell me if this is right?

It’s a wait a second code. I’m trying to shove it in a procedure.

correct, but not possible to make it in one procedure.

See here:

Although I would prefer it to be able to repeat itself, is there a way to do that?

How long you wanna repeat it? better fixup the maxi value and with that one try the logic. Actually what is your objective? if you elaborate then people will suggest the best one

I’d like to make it repeat: wait 2 secs then do something until time=current time+20secs. I don’t know if I can repeat the clock.time component.

You can set/change the timer interval each time the clock fires, then include an if statement to stop the clock if the timer interval is greater than 20 seconds.

Or you can get the start time (when you first call the clock timer), and check the current time against the start time after each firing of the clock, if the difference is greater than 20 seconds, then stop the clock.

Hello, Is this correct? And if so is there a way to shorten it?


Thank you for your help in advance

No it is not correct, and based upon what you have previously asked for, is not the correct approach.

What are in your procedures (or are these file/image pickers) ?

What are you attempting to achieve ?

(Also, no need to start a new topic for this, stick with this one)

This looks like a candidate for lists and Procedure parameters.

What is your experience with those?

Try this


and remove the other clocks
Taifun

I do need to repeat this step 5 times so do I just copy the circled code 5 times?

They just select the image of some buttons. And I also have to have the three procedures repeat until the 20 seconds is up.

No
The clock repeats this for you every 2 seconds
If you want it to stop after the clock fired 5 times, then increment a global variable inside the Timer event and add an if statement like this

counter = counter + 1
if counter > 5
Then set Clock.Enabled to false

Taifun

Thank you very much. That will help a lot :smiling_face: