Re: with timeout of (60 * 60) seconds run script ":Library:Scripts:Universal Scripts:ReadMinders" as alias end timeout
Re: with timeout of (60 * 60) seconds run script ":Library:Scripts:Universal Scripts:ReadMinders" as alias end timeout
- Subject: Re: with timeout of (60 * 60) seconds run script ":Library:Scripts:Universal Scripts:ReadMinders" as alias end timeout
- From: Graff <email@hidden>
- Date: Wed, 16 Jun 2004 11:55:28 -0400
When the "Cancel" button is pressed in the default dialog box it
returns an error -128 which quits the script. The quit script returns
the error to the calling script which also quits. I would change the
call to:
----
try
with timeout of (60 * 60) seconds
run script ":Library:Scripts:Universal Scripts:ReadMinders" as
alias
end timeout
end try
----
You can, of course, also put some error handling in there if you want.
You could also wrap the dialog box command in the called script with a
try block so that the "Cancel" button error gets handled properly.
No matter what it is still a good practice to wrap the "run script"
command with a try block so that errors can be handled gracefully.
- Ken
On Jun 16, 2004, at 9:09 AM, Robert Poland wrote:
Hi,
OS 10.3.4.
I have a script that ends with;
with timeout of (60 * 60) seconds
run script ":Library:Scripts:Universal Scripts:ReadMinders" as alias
end timeout
The "ReadMinders" script ends with a dialog box. When the Dialog box
is clicked the script ends and does not return to the calling script.
What have I overlooked? Do I need to deal with the clicked buttons?
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.