• 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
Quitting a Stay-open Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Quitting a Stay-open Application


  • Subject: Quitting a Stay-open Application
  • From: Luther Fuller <email@hidden>
  • Date: Sun, 20 May 2007 11:28:20 -0500

I've written this simple script which is compiled as a stay-open, show-in-dock application bundle.

on idle
	tell application "Finder"
		set prevCount to count windows
		repeat
			set winCount to count windows
			if winCount = prevCount + 1 then
				activate
				beep
			end if
			set prevCount to winCount
			delay 1
		end repeat
	end tell
	return 1
end idle

on quit
	display dialog "Quitting ..."
	continue quit
end quit

Choosing Quit from the Dock menu has no effect ... I have to Force Quit from the Dock to get the application to actually quit.

If I make the this application frontmost, then choose Quit ... from the application menu, I do get the "Quitting ..." dialog. I can repeat this provided I click the "Cancel" button. If I click the "OK" button, the application continues to run and I can no longer get Quitting ..." dialog.

The only documentation I can find on this is "AppleScriptLanguageGuide.pdf", but this is an ancient document. (It says that the application should quit.)

The 'continue quit' command seems to be broken. Does anyone know more about this?

_______________________________________________
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: Quitting a Stay-open Application
      • From: Emmanuel <email@hidden>
  • Prev by Date: Re: Determine whether spot color is RGB or CMYK in Illustrator CS2
  • Next by Date: Re: Quitting a Stay-open Application
  • Previous by thread: Re: End of wisdom - need some ideas
  • Next by thread: Re: Quitting a Stay-open Application
  • Index(es):
    • Date
    • Thread