• 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: set optionKeyDown to...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set optionKeyDown to...


  • Subject: Re: set optionKeyDown to...
  • From: Robert Poland <email@hidden>
  • Date: Thu, 11 Sep 2008 12:05:27 -0600

Looks interesting.

So far I can't get KeyboardViewerServer to show  a window.

I'll keep trying after lunch.

tell application "System Events"
tell application "KeyboardViewerServer" to activate
set CTRL to (get value of checkbox 63 of window 1 of application process "KeyboardViewerServer") as number
if CTRL is 1 then
tell application "TextEdit" to activate
repeat until CTRL is 0
set CTRL to (get value of checkbox 63 of window 1 of application process "KeyboardViewerServer") as number
keystroke "1"
end repeat
end if
return 1
end tell



On Sep 11, 2008, at 11:44 AM, Mark J. Reed wrote:

So you want to detect if the option key is currently being pressed.

One way I've heard to do this is by using the KeyboardViewerServer and
GUI scripting to see if the key is highlighted.


Bob Poland - Fort Collins, CO



_______________________________________________
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: set optionKeyDown to...
      • From: "Mark J. Reed" <email@hidden>
References: 
 >set optionKeyDown to... (From: Robert Poland <email@hidden>)
 >Re: set optionKeyDown to... (From: Ed Stockly <email@hidden>)
 >Re: set optionKeyDown to... (From: Robert Poland <email@hidden>)
 >Re: set optionKeyDown to... (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: Contains?
  • Next by Date: Re: Contains?
  • Previous by thread: Re: set optionKeyDown to...
  • Next by thread: Re: set optionKeyDown to...
  • Index(es):
    • Date
    • Thread