Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

AppleScripting System Preferences

Hi everyone,


I would like to create an AppleScript which enables/disables the Mission Control shortcut key combo. I have gotten so far


tell application "System Preferences"
  activate
  set current pane to pane "com.apple.preference.keyboard"
  reveal anchor "shortcutsTab" of pane id "com.apple.preference.keyboard"
end tell
tell application "System Events" to tell process "System Preferences"
end tell


This successfully opens Sys Prefs and switches to Keyboard/Shortcuts. But I don’t know what to do from here. How do I select Mission Control in the left part of the window and how do I select/deselect the corresponding Mission Control entry on the right?


The reason I want to create this AppleScript is that I sometimes play games. If I forget to disable the Mission Control shortcuts (ctrl + arrows) before launching the game Mission Control interferes with the game’s controls which results in me switching away from the game inadvertently. Some newer games circumvent this problem by adding themselves to the list of assistive devices. But you’re out of luck with games that don’t offer this. So I want to create an easy way to switch MC’s keyboard shortcut on/off.


Any help is appreciated!

Björn

Posted on May 28, 2018 9:08 AM

Reply

Similar questions

There are no replies.

AppleScripting System Preferences

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.