Re: threads in appleScript
Re: threads in appleScript
- Subject: Re: threads in appleScript
- From: Emmanuel <email@hidden>
- Date: Wed, 8 Jan 2003 10:30:37 +0100
At 8:44 PM +0000 07/01/03, Hamish Graham wrote:
Hi
Is it possible to use threads on AppleScript? I have a button that
does something and I want to be able to click on a second button to
stop what the first button was doing, at the moment my "stop" button
has no effect as the "start" button takes over until it is finished
what it is doing...
So is it possible to put button 1 in its own thread and have button
2 stop button 1s thread? hope that makes sense :)
I wonder what the buttons you are talking about are.
I suppose you're working with ASS.
Smile - where you can make your own dialogs with buttons - offers a
command which simulates multi-threading: smilepause. You would insert
"smilepause(0.0001)" here and there in the script that button 1
triggers. Your script would check after each smilepause some flag
("cancelled", e.g.). And buttons 2 would switch the flag.
There are examples of such a "Start/Stop" button (actually, one
button is often enough) in Smile's distribution.
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.