• 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: when quit is not quit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: when quit is not quit


  • Subject: Re: when quit is not quit
  • From: Jon Pugh <email@hidden>
  • Date: Sun, 4 Nov 2001 08:05:40 -0800

At 10:26 PM -0700 11/3/2001, Donald S. Hall wrote:
>I am not sure what "the next time AppleScript returns" means exactly. Is
>there anyway to force this to happen?

Yes, throw an error.

For example:

quit
error number -128 -- user cancelled

This will cause everything after the error statement to be skipped, although execution will pass to whatever active error handler exists.

There is no way to make quit not return. You need to make the flow of control after the quit get you to a return statement or the end of a handler block.

Another possibility is:

quit
return

But this doesn't work for nested handlers (i.e. a handler which calls another handler) since you only return from the current handler.

Jon


  • Follow-Ups:
    • Re: when quit is not quit
      • From: "Donald S. Hall" <email@hidden>
References: 
 >Re: when quit is not quit (From: "Donald S. Hall" <email@hidden>)

  • Prev by Date: Re: itunes2 and applescript
  • Next by Date: shell commands?
  • Previous by thread: Re: when quit is not quit
  • Next by thread: Re: when quit is not quit
  • Index(es):
    • Date
    • Thread