Hi Richmond,
Use a property.
// btn B
on mouseUp
put 1 into KK
set the cCLicked of btn "Cancel" to false
repeat until KK = 25
if the cClicked of btn "Cancel" is true then exit repeat
set the vis of btn "B" to false
wait 20 ticks with messages
if the cClicked of btn "Cancel" is true then exit repeat
set the vis of btn "B" to true
wait 20 ticks with messages
if the cClicked of btn "Cancel" is true then exit repeat
put KK into fld "KNT"
add 1 to KK
end repeat
end mouseUp
// btn Cancel
on mouseUp
set the cClicked of me to true
end mouseUp
If button Cancel is a checkbox, you could also use the hilite instead of
the cClicked of the button.
I don't know at which point you want to exit the repeat loop, so I put
the exit command in all relevant places.
--
Best regards,
Mark Schonewille
Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553
Installer Maker for LiveCode:
http://qery.us/468
Buy my new book "Programming LiveCode for the Real Beginner"
http://qery.us/3fi
LiveCode on Facebook:
https://www.facebook.com/groups/runrev/
On 7/14/2014 10:05, Richmond wrote:
So . . . here I am with a stack containing 2 buttons: 'B' and 'cancel',
and a field 'KNT':
Btn 'B' contains the script:
on mouseUp
put 1 into KK
repeat until KK = 25
set the vis of btn "B" to false
wait 20 ticks with messages
set the vis of btn "B" to true
wait 20 ticks with messages
put KK into fld "KNT"
add 1 to KK
end repeat
end mouseUp
I want to stop the action started by btn "B" using a script
in btn "cancel" but cannot work out how to do that.
Richmond.
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode