• 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
El Capitan & System Preferences โ€“ Focus on Main Button Panel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

El Capitan & System Preferences โ€“ Focus on Main Button Panel


  • Subject: El Capitan & System Preferences โ€“ Focus on Main Button Panel
  • From: Christopher Stone <email@hidden>
  • Date: Fri, 30 Oct 2015 02:04:21 -0500

Hey Folks,

Sometimes it seems like Apple changes things very capriciously.

In 3 releases of OSX (10.9, 10.10, and 10.11) the navigation behavior of the main window of the System Preferences has changed.

Generally I use LaunchBar to bring up the specific pref panel I want to adjust, but if the system-prefs are already open I want to be able to type-select to navigate to the pref-panel I need.

You can type-select when focus in in the main panel, but there's not a simple means to get focus in there if it's already elsewhere (e.g. the find field).

In Yosemite I believe you could just hit Escape, and then start typing.

In El Capitan you can type 1 letter and hit escape to get there (which is pretty unintuitive).

I finally got fed-up and wrote a script to set focus on the General button.  Bound to a keyboard shortcut in FastScripts it makes type-select a little more comfortable.

I wanted to move to the general scroll area without selecting a button, but I couldn't find the means.

--
Best Regards,
Chris

-------------------------------------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2015/10/30 01:40
# dMod: 2015/10/30 01:47
# Appl: System Preferences & System Events
# Task: Set Focus to General Button in main pane of 
# Libs: ELb
# Osax: None
# Tags: @Applescript, @Script, @System_Events, @Set, @Focus, @General, @Button
-------------------------------------------------------------------------------------------

try

  

  tell application "System Events"
    tell application process "System Preferences"
      tell (first window whose subrole is "AXStandardWindow")
        if its name is "System Preferences" then
          tell scroll area 1 to tell button "General"
            set focused to true
          end tell
        else
          beep 2
        end if
      end tell
    end tell
  end tell

  

on error e number n
  stdErr(e, n, true, true) of me
end try

-------------------------------------------------------------------------------------------
--ยป HANDLERS
-------------------------------------------------------------------------------------------
on stdErr(e, n, beepFlag, ddFlag)
  set e to e & return & return & "Num: " & n
  if beepFlag = true then
    beep
  end if
  if ddFlag = true then
    tell me
      set dDlg to display dialog e with title "ERROR!" buttons {"Cancel", "Copy", "OK"} default button "OK"
    end tell
    if button returned of dDlg = "Copy" then set the clipboard to e
  else
    return e
  end if
end stdErr
-------------------------------------------------------------------------------------------



 _______________________________________________
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

  • Prev by Date: Re: Script Editor phantoms
  • Next by Date: Playing Sounds in AppleScript
  • Previous by thread: Catching errors in dialog Input
  • Next by thread: Playing Sounds in AppleScript
  • Index(es):
    • Date
    • Thread