Re: Timeout Function acting weird!!!
Re: Timeout Function acting weird!!!
- Subject: Re: Timeout Function acting weird!!!
- From: "Arthur J Knapp" <email@hidden>
- Date: Wed, 21 Mar 2001 13:43:46 -0500
>
Date: Wed, 21 Mar 2001 09:36:50 +1100
>
Subject: Timeout Function acting weird!!!
>
From: William Jamieson <email@hidden>
>
I am attempting to use the AppleScript timeout command for a variety of
>
applications. Yet I find that I am getting inconsistent results.
>
try
>
with timeout of 8 seconds
The timeout block is for use with applications. It specifies the
amount of time that your script will wait for the result of an
AppleEvent sent to an application. In your example above, there is
no application involved.
>
However I hold the an application open with a dialog I can generate a
>
timeout error (-1712) (try using the code below).
>
try
>
with timeout of 8 seconds
>
tell application "Finder"
>
activate
>
display dialog "Holding Finder Open" giving up after 10
So AppleScript is giving the Finder 8 seconds to activate. Then
it is giving the Finder 8 seconds to return the result of the display
dialog command.
>
set x to 0
>
try
>
with timeout of 1 seconds
>
repeat 2000000
>
set x to x + 1
Again, there is no application involved.
<
http://developer.apple.com/techpubs/macos8/InterproCom/AppleScriptScripters
/AppleScriptLangGuide/index.html>
Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden
Hey, check out:
http://www.AppleScriptSourceBook.com