AS 1.6 timeout bug?
AS 1.6 timeout bug?
- Subject: AS 1.6 timeout bug?
- From: "Donald S. Hall" <email@hidden>
- Date: Mon, 26 Nov 2001 22:51:14 -0700
The scripts below work fine if "theScript" is in the same file as the test
script that runs it, but gives an instant timeout error (-1712), even though
the wait time is supposedly one minute, if "theScript" resides in another
file.
The test script uses the dummy tell block to enable the timeout feature. See
the Applescript in a Nutshell book, page 152. Without it, the test script
will always wait for the run script command to complete, which I do not
want. ("theScript" is only a sample script to illustrate the problem. I want
to run others that could take a very long time to run, and I want the main
script to proceed without waiting.)
The instant timeout error seems to only occur when theScript contains a
"Finder" tell block. If I run a script that uses an "Interarchy" tell block
for example, there is no problem.
There is also no problem in OS X 10.1.
Is this some kind of a bug in AS 1.6? Is there a way around it?
Thanks for any insights,
Don
-- test script ------------------------------------------
set waittime to 60
try
with timeout of waittime seconds
tell application "Finder" -- dummy tell to enable timeout
get version
run script theScript
end tell
end timeout
display dialog the result as text
on error errMsg number errNum
display dialog errMsg & return & "Number: " & errNum
end try
-- sample script using the Finder -------------------------------------
script theScript
set {AppleScript's text item delimiters, oldTIDs} to {",", AppleScript's
text item delimiters}
tell application "Finder"
set proclist to name of every process whose visible is true
end tell
set proclist to proclist as text
set AppleScript's text item delimiters to oldTIDs
return proclist
end script
------------------------------------------------------------------------
--
Donald S. Hall, Ph.D.
Apps & More Software Design, Inc.
http://www.theboss.net/appsmore
email@hidden