• 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
quit command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

quit command


  • Subject: quit command
  • From: louie <email@hidden>
  • Date: Mon, 11 Apr 2011 12:33:19 -0700

A big thank you to all of you who helped me with this challenge.
It came apparent that I could not detect the command q command but I could detect the result of the key pressed. See below script.
global x
set x to 0
tell application "TextEdit"
	activate
end tell
on idle
	set x to x + 1
	if x ≥ 5 then
		if application "TextEdit" is running then
			say "working"
		else
			tell current application
				quit
			end tell
		end if
		set x to 0
	end if
	return 0.5
end idle
Any thoughts?

louie
email@hidden



 _______________________________________________
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

  • Prev by Date: Re: [ANN] TagMinder
  • Next by Date: Empty Record
  • Previous by thread: [ANN] TagMinder 1.0.3 update
  • Next by thread: Empty Record
  • Index(es):
    • Date
    • Thread