• 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: Solution to quit-problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Solution to quit-problem


  • Subject: Re: Solution to quit-problem
  • From: Luther Fuller <email@hidden>
  • Date: Thu, 02 May 2013 07:56:40 -0500

On May 2, 2013, at 7:05 AM, Jörgen Stahle wrote:

on idle
-- huge code mass
end idle

on quit
my doCleanUps() -- clean up ssteps
do shell script "kill " & my gAppID
end quit

I was curious, so I did a little experiment.
I saved this as a stay-open script ...

on idle
beep
return 1
end idle

on quit
display dialog "Quit Beeping?"
end quit

When I run it, its icon appears in the Dock, allowing me to select Quit from the application's Dock menu.
This causes the "Quit Beeping?" dialog to appear, from which I select "OK".
But …  the application continues to run.

I added one line of code ...

on idle
beep
return 1
end idle

on quit
display dialog "Quit Beeping?"
continue quit
end quit

and this script DOES Quit after the dialog.
Try using 'continue quit' instead of 'do shell script "kill " & my gAppID'.



 _______________________________________________
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: Solution to quit-problem
      • From: Jörgen Stahle <email@hidden>
References: 
 >Solution to quit-problem (From: Jörgen Stahle <email@hidden>)

  • Prev by Date: Re : uneditable [OT]
  • Next by Date: Re: uneditable
  • Previous by thread: Solution to quit-problem
  • Next by thread: Re: Solution to quit-problem
  • Index(es):
    • Date
    • Thread