• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
changing keyboard shortcut check boxes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

changing keyboard shortcut check boxes


  • Subject: changing keyboard shortcut check boxes
  • From: "email@hidden" <email@hidden>
  • Date: Mon, 31 Oct 2005 17:22:02 GMT

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

  • Follow-Ups:
    • Re: changing keyboard shortcut check boxes
      • From: kai <email@hidden>
  • Prev by Date: Re: strange location indexes
  • Next by Date: Rsync reliability?
  • Previous by thread: Re: strange location indexes
  • Next by thread: Re: changing keyboard shortcut check boxes
  • Index(es):
    • Date
    • Thread