• 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: AppleScript Language Guide
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript Language Guide


  • Subject: Re: AppleScript Language Guide
  • From: Andy Wylie <email@hidden>
  • Date: Sat, 27 Apr 2002 23:01:25 +1200

on 27/4/02 10:11 PM +1200: Jason Filice wrote:

> However, one specific change that comes to mind is that at version 1.4.0
> <http://www.applescriptsourcebook.com/applescript/applescript140.html#newfea
> tures> the "on error" handler was no longer needed in a "try" statement. In
> other words, if you did not care about handling an error in a try statement
> (and just wanted it ignored), you do not have to include the "on error"
> part. In fact, if you *did* type "on error" and didn't include any
> statements in the handler, it would be removed altogether when you compiled
> it (at least it did for me, in Mac OS 9.0.4 and later).
>
> try
> tell application "Finder"
> select file "Finder" of the system folder
> delete selection
> end tell
> on error --necessary on versions of AppleScript before 1.4.0
> end try
>


try
tell application "Finder"
select file "Finder" of the system folder
delete selection
end tell
on error m number n--suppresses messages
end try

_____________________________ Andy
_______________________________________________
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.

References: 
 >Re: AppleScript Language Guide (From: Jason Filice <email@hidden>)

  • Prev by Date: ATM 4.6.2 Mac Type 2 and Type 3 Errors,Crashing,Stalling,Quiting at random,a fix
  • Next by Date: How to calculate/process this one?
  • Previous by thread: Re: AppleScript Language Guide
  • Next by thread: Re: AppleScript Language Guide
  • Index(es):
    • Date
    • Thread