Created
January 9, 2019 19:17
-
-
Save nielsbom/222a3c79ccf61bdc18b07733440015b8 to your computer and use it in GitHub Desktop.
AppleScript to toggle macOS accessiblity for greyscale
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tested on macOS Mojave. | |
# Depending on your language settings you may need to change "greyscale" to "grayscale". | |
tell application "System Preferences" | |
activate | |
reveal anchor "Seeing_Display" of pane id "com.apple.preference.universalaccess" | |
end tell | |
tell application "System Events" to tell process "System Preferences" | |
repeat until exists of checkbox "Use greyscale" of group 1 of window "Accessibility" | |
delay 0.1 | |
end repeat | |
click the checkbox "Use greyscale" of group 1 of window "Accessibility" | |
end tell | |
tell application "System Preferences" | |
quit | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment