On 6 May 2008, at 23:50, RevList wrote:
I have a routine that is looping through and opening a series of text
files using a Repeat Loop.
I know I can do a Command . to stop this, but what if I wanted to
let the
end user stop the process? How would I code this?
Stewart
Another way, if you want ot have a 'stop' button, for instance, is to
have a script local variable that you set from a button :
in the stack or card script that runs the loop:
local sStopLoop = false
on someFunction
repeat until jobDone
if sStopLoop then exit repeat
doStuff...
wait 0 millisecs with messages -- need this to allow rev to
respond to button clicks
end repeat
cleanUpStuff...
end someFunction
on stopLoop
put true into sStopLoop
end stopLoop
Then in the stop button script:
on mouseUp
stopLoop
end mouseUp
Best,
Mark
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution