'with timeout' and scripting additions
'with timeout' and scripting additions
- Subject: 'with timeout' and scripting additions
- From: Donald Hall <email@hidden>
- Date: Thu, 21 Apr 2005 00:11:49 -0600
According to Perry's Nutshell book, page 152, 'with timeout' should
work with a scripting addition command called inside a tell block
that targets another application.
For example:
try
with timeout of 5 seconds
tell application "Finder"
get version
display dialog "this is a timeout test"
end tell
end timeout
on error errMsg
display dialog errMsg
end try
This works as expected if the dialog is left on the screen for more
than 5 seconds a timeout error is generated.
However, if I change the script to the following:
script TimeoutTest
display dialog "this is a timeout test"
end script
try
with timeout of 5 seconds
tell application "Finder"
get version
run script TimeoutTest
end tell
end timeout
on error errMsg
display dialog errMsg
end try
the timeout error does not occur, even though 'run script' is another
scripting addition.
I could have sworn this worked some years ago (OS 9 maybe). What
gives? What am I missing?
Thanks for any insights,
Don
--
Donald S. Hall, Ph.D.
Apps & More Software Design, Inc.
email@hidden
http://www.appsandmore.com
_______________________________________________
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