Re: Key Code For Option Key
Re: Key Code For Option Key
- Subject: Re: Key Code For Option Key
- From: Bill Cheeseman <email@hidden>
- Date: Tue, 11 Mar 2008 16:31:01 -0400
- Thread-topic: Key Code For Option Key
on 2008-03-11 12:49 PM, Thomas Maffucci at email@hidden wrote:
> I want to be able to be able to activate mouse keys by pressing the option
> key 5 times from apple script. The appropriate box has been checked in
> Universal Access System Preferences.
The option key is a modifier key. It can modify the value of other keys, but
I don't believe there is any direct way to "press" it using AppleScript.
You can, however, use GUI Scripting to set the checkbox to activate mouse
keys. Assuming that the "Enable access for assistive devices" setting in the
Universal Access pane of System Preferences is already turned on, this
script will accomplish your goal:
tell application "System Preferences"
activate
set current pane to pane id "com.apple.preference.universalaccess"
end tell
tell application "System Events"
tell process "System Preferences"
tell tab group 1 of window 1
click radio button 4
if value of checkbox 1 is 0 then
click checkbox 1
end if
end tell
end tell
end tell
quit application "System Preferences"
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
www.quecheesoftware.com
PreFab Software - www.prefabsoftware.com
_______________________________________________
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