Jump to content

Jadkh

Member
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Jadkh

  1. Hello! 
    I found an AppleScript that allow to check and uncheck the "Use F1, F2 etc. as standard function keys" in the keyboard prefpane.

    I check the security preferences and Alfred is check in the accessibility tab. 
    When I run it inside Script Editor it works but when running in alfred workflow editor I get errors. 
    Could somebody help me ? 
    Thanks :)

    Jad

    [INFO: alfred.workflow.trigger.hotkey] Processing output 'alfred.workflow.action.applescript' with arg ''
    [ERROR: alfred.workflow.action.applescript] {
        NSAppleScriptErrorAppName = "System Events";
        NSAppleScriptErrorBriefMessage = "Can\U2019t get checkbox 1 of tab group 1 of window 1 of process \"System Preferences\". Invalid index.";
        NSAppleScriptErrorMessage = "System Events got an error: Can\U2019t get checkbox 1 of tab group 1 of window 1 of process \"System Preferences\". Invalid index.";
        NSAppleScriptErrorNumber = "-1719";
        NSAppleScriptErrorRange = "NSRange: {90, 47}";
    }

    Here is the small script in question: 

    tell application "System Events" to tell process "System Preferences"
    click checkbox 1 of tab group 1 of window 1
    end tell
    quit application "System Preferences"
×
×
  • Create New...