Jump to content

tudor

Member
  • Posts

    2
  • Joined

  • Last visited

Everything posted by tudor

  1. Using OS X 10.11.13 and have included code below that works for me: on alfred_script(q) tell application "System Preferences" set current pane to pane "com.apple.preference.keyboard" end tell tell application "System Events" -- If we don't have UI Elements enabled, then nothing is really going to work. if UI elements enabled then tell application process "System Preferences" get properties click radio button "Keyboard" of tab group 1 of window "Keyboard" click checkbox "Use all F1, F2, etc. keys as standard function keys" of tab group 1 of window "Keyboard" set messageToShow to "Function keys set to " if (value of checkbox "Use all F1, F2, etc. keys as standard function keys" of tab group 1 of window "Keyboard") as boolean then set messageToShow to messageToShow & "standard function keys." else set messageToShow to messageToShow & "media/hardware controls." end if display notification messageToShow end tell tell application "System Preferences" to quit else -- GUI scripting not enabled. Display an alert tell application "System Preferences" activate set current pane to pane "com.apple.preference.security" display dialog "UI element scripting is not enabled. Please activate this app under Privacy -> Accessibility so it can access the settings it needs." end tell end if end tell end alfred_script Hope it works for you as well, good luck! Best, Tudor
  2. Hi Chris, Thank you so much for this workflow. Obviously love Alfred and just got my SONOS system installed and in the process of developing a complex HA system with as much automation and having ease of use is critical during iterations. Seems to be working so far and will gladly provide feedback as I go. Thank you very much and all my very best, Tudor
×
×
  • Create New...