Re: With timeout of
Re: With timeout of
- Subject: Re: With timeout of
- From: "Marc K. Myers" <email@hidden>
- Date: Sat, 09 Dec 2000 00:39:40 -0500
- Organization: [very little]
Mystboy74 wrote:
>
From: email@hidden
>
Date: Fri, 8 Dec 2000 17:17:38 EST
>
Subject: With timeout of
>
To: email@hidden
>
>
my script keeps timing out. I need it to be used, and then open another app
>
and wait till user is finished to select another app to open and so on. i
>
have a with timeout of 100000 seconds which is over a day. after a minute it
>
times out, and when i click edit it highlights the line in my on error. I
>
think it may have to do with the tell me's, but i need the dialogs to be in
>
the script's app. here it is, shortened:
>
>
...yada yada yada
>
tell application "Finder"
>
try
>
with timeout of 100000 seconds
>
...yada yada yada
>
repeat
>
tell me to set theApp to (choose from list theList with
>
prompt "" default items {theApp} cancel button name "Quit") as text
>
if theApp is "Ships" then
>
...yada yada yada
>
else if theApp is "Other" then
>
open theplug using alias (mpath & "Apps:Resedit")
>
end if
>
end repeat
>
end timeout
>
on error theerr number theenum
>
tell me to display dialog "An error has occurred." buttons {"
>
Description", "Quit"} default button 2
>
if the button returned of the result is "Description" then
>
tell me to display dialog "#" & theenum & return & return &
>
theerr buttons "Quit" default button 1
>
end if
>
end try
>
end tell
Timing out happens only when AS has called an app and hasn't gotten a
response within the time limit. Therefore, "with timeout" in front of a
"tell me" is meaningless. Bracket the call(s) to the application(s)
with the timeout statements, not the whole repeat block.
with timeout of 10000 seconds
tell application "someApp"
-- do something
end tell
end timeout
Marc [12/9/00 12:37:06 AM]