Re: set optionKeyDown to...
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