Page 1 of 1

Loop Pause/wait/stop for user input

Posted: Sun Nov 29, 2015 4:14 pm
by Not a lot of thought
I have an instance where I'm running a loop, but if a certain condition exists then I need the user to confirm information before the loop continues. I'd like to pause the loop and wait for a user response then either move to the next iteration or run through the current. The only thing I'm struggling with is stopping the loop to await user input. Does anyone know of a good tutorial or have any suggestions? I've tried looking for a stop and pause command but nothing I found seemed like it would be helpful. I also wasn't sure if I could use an if else statement to accomplish this.

Re: Loop Pause/wait/stop for user input

Posted: Sun Nov 29, 2015 4:55 pm
by dunbarx
Hi

On a new card, make a button and two fields. Put this into the button script:

Code: Select all

on mouseUp
   repeat with y = 1 to 25
      wait 15
      if y = 15 then
         ask "Think of a number"
         put it into fld 2
      end if
      put y into fld 1
   end repeat
end mouseUp
Does this help?

Craig Newman