Re: scripts timing out.
Re: scripts timing out.
- Subject: Re: scripts timing out.
- From: Timothy Bates <email@hidden>
- Date: Thu, 13 Sep 2001 10:51:54 +1000
On 9/13/01 7:36 AM, "Andrew Simpson" <email@hidden> wrote:
>
Is there a way to tell a script that the line it has just executed is going
>
to take a while and could it please wait until the actions are performed
>
until moving onto the next statement or timing out.
that is two different things.
for the timeout element - do this
with timeout of 5 * 60 seconds
--stuff
end timeout
to wait until it is safe to carry on, you need to code this specifically.
For example
with timeout of 5 * 60 seconds
--stuff
tell application "Internet Explorer" to GetURL theURL to myfile
isitsafe(myfile)
end timeout
on isitsafe(fileName)
repeat while (busy of (info for fileName))
delay 1
end repeat
end isitsafe
If you have not already, grab the appleScript guide. It is sometime
available at
http://developer.apple.com/techpubs/macos8/InterproCom/AppleScriptScripters/
AppleScriptLangGuide/index.html
Apple keep moving it so that no one will be able to learn AppleScript, but I
keep a copy on line for my own use and I could not stop you from grabbing a
copy from here while apple fixes their own link:
http://www.maccs.mq.edu.au/~tim/psyscript/downloads/AppleScriptLanguageGuide
.pdf
tim