run script not returning (new name)
run script not returning (new name)
- Subject: run script not returning (new name)
- From: Robert Poland <email@hidden>
- Date: Wed, 16 Jun 2004 10:34:31 -0600
Looks like I didn't make myself clear.
There is no "Cancel" button.
When the Dialog is accepted in the ReadMinders script I want control
to return to the original script.
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.
--
Bob Poland - Englewood, CO
http://www.ibrb.org/
_______________________________________________
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.