• 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: Moving on even when a part fails
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving on even when a part fails


  • Subject: Re: Moving on even when a part fails
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 2 Sep 2003 09:55:38 -0700

On Tuesday, September 2, 2003, at 09:23 AM, Lorin Rivers wrote:

If the "bar" app fails, the script stops, even though the code that follows the end tell of "bar" is still something I want to occur. How can I make the script continue?

Put each inside a try wrapper.

try
tell application "foo"
activate
end tell
end try

try
tell application "bar"
connect to thingie using settings {blah blah}
end tell
end try

try
tell application "Finder"
open application "GooglieMooglie.app" of blah
end tell
end try

Of course, if you want to have it handle the error in some way, you can use "on error" within the try.

--Michelle

--
Give Peace A Chance.
_______________________________________________
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: 
 >Moving on even when a part fails (From: Lorin Rivers <email@hidden>)

  • Prev by Date: Re: Launch, then hide an app
  • Next by Date: Re: Moving on even when a part fails
  • Previous by thread: Re: Moving on even when a part fails
  • Next by thread: Re: Moving on even when a part fails
  • Index(es):
    • Date
    • Thread