• 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: Why Doesn't This Script.app Quit?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why Doesn't This Script.app Quit?


  • Subject: Re: Why Doesn't This Script.app Quit?
  • From: "S. J. Cunningham" <email@hidden>
  • Date: Sun, 17 Jan 2016 07:47:53 -0500

On Jan 17, 2016, at 5:56 AM, Nigel Garvey wrote:

> Shane Stanley wrote on Sun, 17 Jan 2016 13:00:18 +1100:
>
>> On 17 Jan 2016, at 07:00, S. J. Cunningham <email@hidden> wrote:
>>
>>> I did it this way to make it a little more transparent::
>>>
>>> on run
>>> 	quit
>>> 	display dialog "Hah Hah Hah!  You can't kill me!"
>>> end run
>>>
>>> on quit
>>> 	error number -128
>>> end quit
>>>
>>> I also wrote a routine to get the Process ID and kill it via "do shell
>>> script", but this is more direct.
>>
>> Maybe I missed something, but why aren't you using "continue quit" in
>> the quit handler?
>
> I don't think Steve fully understood the advice he received from Ed and
> myself. (My own post wasn't very well phrased.)

I thought your post was phrased just fine and understood it.  Perhaps my replies have been less than clear resulting in your impression :)

> [Snip]
>  3. On a Snow Leopard system, when a script applet's told to quit in the middle of a script, it'll complete what it's doing first

Sounds like a truculent child :)

> [Snip]
>  6. Contrary to Steve's assertion in quote above, It's more transparent to write 'error number -128' when that's what's meant than to disguise it as a 'quit' command.

Perhaps I should have said "more transparent to me"  in that I expected "quit" should, well, quit.  And, in fact it does in Yosemite.  A question for the audience to ponder is:  Is that a bug in Yosemite or was it a bug in Snow Leopard?

Thanks for your and Ed's help in clearing this up and providing a work-around.

BTW, the particular script application which brought my problem to light was an unattended, stay open app which loads a run-time library on first start up.  If the library can't be loaded, I want it to quit, not continue merrily along messing up data files, etc.  Perhaps I am being overly cautious in that testing should reveal any problem with loading the library but I am trying for maximum reliability in this particular set of applications.

Steve
------------------
OS X 10.6.8, AppleScript 2.1.2


 _______________________________________________
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: 
 >Re: Why Doesn't This Script.app Quit? (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: Grammar Police in OS X 10.11
  • Next by Date: Re: Grammar Police in OS X 10.11
  • Previous by thread: Re: Why Doesn't This Script.app Quit?
  • Next by thread: Handlers in a variable
  • Index(es):
    • Date
    • Thread