changing keyboard shortcut check boxes
changing keyboard shortcut check boxes
Hi! I am trying to turn off some keyboard shortcuts if they have been selected and I am having a problem where my code seems to only turn off the check box of whatever row is currently highlighted. I am looping through each row checking for the "Keyboard Navigation" line. However, if last I had the "Input Menu" line highlighted for example and it is currently turned ON, that one seems to be the one that is turned OFF. Is there something I am missing to highlight the line I want before clicking the check box, or something wrong with my code to click on the correct check box? I am running OS 10.4.2, AppleScript 1.10, and ScriptEditor 2.1.
Here is the code I have so far:
-- set the shortcut keys
tell application "System Preferences"
activate
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"
-- get each row's description
set myOutline to outline 1 of scroll area 1
set myRows to rows of myOutline
repeat with thisRow in myRows
try
set thisItemDesc to (value of text field 1 of thisRow)
-- check for keyboard navigation hotkeys
if thisItemDesc is equal to "Keyboard Navigation" then
if (value of checkbox 1 of thisRow) is not equal to 0 then
click checkbox 1 of thisRow
return
end if
end if
end try
end repeat
end tell
Thanks!
-- Jennifer
___________________________________________________________________
Try Juno Platinum for Free! Then, only $9.95/month!
Unlimited Internet Access with 250MB of Email Storage.
Visit http://www.juno.com/value to sign up today!
_______________________________________________
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