Re: check alias
Re: check alias
- Subject: Re: check alias
- From: Michelle Steiner <email@hidden>
- Date: Tue, 29 Sep 2009 08:24:56 -0700
On Sep 29, 2009, at 8:14 AM, Rounak Jain wrote:
Wait!!! I just tested: set ifolder to "path:to:" try ifolder as alias try ifolder as alias on error e beep 2 end try on error e beep 3 end try
and I found that what you said is correct. But my problem is that i want one of the "on error" before the last on error to do something. For example, in the above script, I want to hear two beeps, not three. How to do it?
The problem is that when it encounters the first (i.e., outermost) try, it immediately goes to the outermost on error.
This should do what you want.
set ifolder to "path:to:" try ifolder as alias on error e try ifolder as alias on error f beep 2 end try beep 3 end try
You will wind up getting five beeps. -- Tubal Litigation: Suing because of a misconception
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden