Re-3: abort scripts
scott at tactilemedia.com
Wed Jun 13 16:33:54 CDT 2007
Recently, runrev260805 at m-r-d.de wrote:
> I have a stack with one card. The card contains 4 Buttons. 3 Buttons start
> routines, which take about 5 minutes each to finish. Clicking on the fourth
> button shall abort the running sript of the button, which was pressed.
> Thought, i could solve this with 'send "exit to top" to button btnToStop',
> where btnToStop contains the button name. But this does not work.
> How can i achieve this?
Assuming your routine is a loop of some kind, you could do it by setting a
custom property of the card, similar to this:
[routine button scripts]
set the allowProcessing of this cd to true
if not the allowProcessing of this cd then exit to top
-- do myStuff
send "doMyRoutine" to me in 5 millisecs
[cancel button script]
set the allowProcessing of this cd to false
Tactile Media, Multimedia & Design
More information about the use-livecode