>hi all, >got a script than stays looping in a repeat. >in some case, the loop takes several seconds to end. But i want to be able >to let him stop during the repeat. > >tried something like this via a button, but its ignored. > >global stop > >on somehandler > repeat with x = 1 to Myvar > if Stop = true > Stop = false > exit repeat > else > do your job > end repeat >end > >on a button got a stop = true, global stop
The repeat loop is hogging the CPU. If you're using a keyDown handler, it will wait until the repeat finishes. I would either change the repeat loop to a frame event, or use "on keyPressed." keyPressed will interrupt a loop. Cordially, Kerry Thompson [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
