Re: changing keyboard shortcut check boxes
Re: changing keyboard shortcut check boxes
- Subject: Re: changing keyboard shortcut check boxes
- From: kai <email@hidden>
- Date: Thu, 3 Nov 2005 23:44:25 +0000
On 3 Nov 2005, at 19:17, email@hidden wrote:
That almost worked perfectly. What I want is for the entire area
to be turned OFF. However if not all of the items under "Keyboard
Navigation" are turned ON, then the value of the check box is not
1, it is 0.5. And if I click on Keyboard Navigation when the value
of the check box is 0.5, then all items underneath are turned ON.
The check box needs to be clicked twice in that case to turn the
entire submenu OFF. So I modified it to be as follows:
-----------------
-- get the keyboard preferences pane
tell application "System Preferences"
set current pane to pane "com.apple.preference.keyboard"
end tell
-- open the keyboard shortcuts menu
tell application "System Events" to tell process "System
Preferences" to tell tab group 1 of window 1
-- move to keyboard shortcuts
click radio button "Keyboard Shortcuts"
-- check for keyboard navigation on
tell outline 1 of scroll area 1
tell (first row whose value of text field 1 is "Keyboard
Navigation")
-- this will check if only some of the entries under keyboard
navigation
-- are turned ON
if value of checkbox 1 is 0.5 then
select
-- this will turn all sub-entries ON
click checkbox 1
end if
-- this will check if all of the entries under keyboard
navigation are
-- turned ON
if value of checkbox 1 is 1 then
select
-- this will turn all sub-entries OFF
click checkbox 1
end if
end tell
end tell
end tell
-----------------
Or even:
-----------------
tell application "System Preferences" to set current pane to pane
"com.apple.preference.keyboard"
tell application "System Events" to tell process "System Preferences"
to tell tab group 1 of window 1
click radio button "Keyboard Shortcuts"
tell (first row of outline 1 of scroll area 1 whose value of text
field 1 is ¬
"Keyboard Navigation") to repeat until value of checkbox 1 is 0
select
click checkbox 1
end repeat
end tell
-----------------
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden