• 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: Sat, 16 Jan 2016 15:00:37 -0500


On Jan 15, 2016, at 5:26 PM, Stockly, Ed wrote:



On 1/15/16, 1:28 PM,
"applescript-users-bounces+ed.stockly=email@hidden on
behalf of S. J. Cunningham"
<applescript-users-bounces+ed.stockly=email@hidden on
behalf of email@hidden> wrote:

Unfortunately, I need the script to run unattended so answering a display
dialog isn't going to work.

Does this work? You don't need the display dialog command to trip the user
cancelled error

error number -128 —- this error stops the script.
display dialog "You shouldn't see this"


That works, Ed.  Thanks.  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.

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

  • Follow-Ups:
    • Re: Why Doesn't This Script.app Quit?
      • From: Shane Stanley <email@hidden>
References: 
 >Re: Why Doesn't This Script.app Quit? (From: Nigel Garvey <email@hidden>)
 >Re: Why Doesn't This Script.app Quit? (From: "S. J. Cunningham" <email@hidden>)
 >Re: Why Doesn't This Script.app Quit? (From: "Stockly, Ed" <email@hidden>)

  • Prev by Date: Re: AppleScript lists are O(1) vectors (was Re: AS Library Question)
  • Next by Date: Re: [ASOC] returning by reference, and converting script objects to descriptors?
  • Previous by thread: Re: Why Doesn't This Script.app Quit?
  • Next by thread: Re: Why Doesn't This Script.app Quit?
  • Index(es):
    • Date
    • Thread