Is option key down?
Is option key down?
- Subject: Is option key down?
- From: Robert Poland <email@hidden>
- Date: Thu, 3 Sep 2009 15:20:38 -0600
Hi,
I've been using this and variations for some time.
my optionKeyDowntest()
set optionKeyDown to result
on optionKeyDowntest()
try
tell application "System Events"
if not ((some process whose name contains
"KeyboardViewerServer.app") exists) then
tell application "KeyboardViewerServer.app" to activate
end if
end tell
on error
try
tell application "KeyboardViewerServer.app" to activate
on error
return false
end try
end try
tell application "System Events"
return (get value of checkbox "⌥" of window 1 of application
process "KeyboardViewerServer.app") as boolean
end tell
end optionKeyDowntest
Now, since Apple (Snow Leopard) has done away with(?)
KeyboardViewerServer.app it no longer works.
Does anyone have another way to tell if the option key, etc is down?
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