Re: Interrupting a wait loop
Re: Interrupting a wait loop
- Subject: Re: Interrupting a wait loop
- From: "J. Stewart" <email@hidden>
- Date: Sat, 14 Jan 2006 04:29:06 -0500
On 1/13/06 at -0600 John Fowler said this
>In my Applescript app a wait loop gets a wait time from the GUI
>interface. I usually set this to 60 minutes. Every 60 minutes, code
>executes. When code finishes, the wait loop serially checks the time
>to see if 60 minutes have passed, executing the code again if so.
>
>The problem is, I can't change the interface elements during the wait
>loop. So the only way I can quit my app or discontinue the wait loop
>is to "Force Quit." This gets tiresome after a while.
>
>There is bound to be a better way to introduce a delay of 60 minutes
>between code executions, which would allow me to access my interface
>during the wait loop. Please help with suggestions in this regard.
What you want is an "on idle" handler in a stay-open script.
See page 307 in the Applescript Language Guide (v1.3.7)
The web version is here -
<http://developer.apple.com/documentation/AppleScript/Conceptual/AppleScriptLangGuide/index.html>
or you can d/l the pdf version -
<http://developer.apple.com/documentation/AppleScript/Conceptual/AppleScriptLangGuide/AppleScriptLanguageGuide.pdf>
JBS
--
A day without sunshine is like... night.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden