Re: set optionKeyDown to...
Re: set optionKeyDown to...
- Subject: Re: set optionKeyDown to...
- From: "Mark J. Reed" <email@hidden>
- Date: Thu, 11 Sep 2008 14:27:42 -0400
Interestingly enough, the technique for detecting a key down
reportedly works even without the window being visible.
On Thu, Sep 11, 2008 at 2:05 PM, Robert Poland <email@hidden> wrote:
> 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
>
>
>
>
--
Mark J. Reed <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