• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: check alias
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >check alias (From: Rounak Jain <email@hidden>)
 >Re: check alias (From: Brian Christmas <email@hidden>)
 >Re: check alias (From: Rounak Jain <email@hidden>)

  • Prev by Date: Re: AS Application
  • Next by Date: Re: check alias
  • Previous by thread: Re: check alias
  • Next by thread: Re: check alias
  • Index(es):
    • Date
    • Thread