Skip to content

Instantly share code, notes, and snippets.

@ralexstokes
Last active February 8, 2019 17:05
Show Gist options
  • Save ralexstokes/f96c9fa06e50cb6c6543592d728972b0 to your computer and use it in GitHub Desktop.
Save ralexstokes/f96c9fa06e50cb6c6543592d728972b0 to your computer and use it in GitHub Desktop.
Toggles grayscale mode on the display in macOS Mojave
on run {input, parameters}
tell application "System Preferences"
reveal anchor "Seeing_Display" of pane id "com.apple.preference.universalaccess"
end tell
tell application "System Events" to tell process "System Preferences"
delay 0.1
click checkbox "Use grayscale" of group 0 of window "Accessibility"
end tell
tell application "System Preferences" to if it is running then quit
return
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment