Toggling Accessibility's "Enable Color Filters" with AppleScript
Hi all,
I'm trying, with AppleScript to create a keyboard shortcut that would toggle the "Enable Color Filters" setting in Accessibility in System Preferences. I used to use a script that was something like this one:
tell application "System Preferences"
launch
reveal anchor "Seeing_Display" of pane id "com.apple.preference.universalaccess"
end tell
tell application "System Events" to tell process "System Preferences"
delay 1
click checkbox "Enable Color Filters" of window "Accessibility"
end tell
tell application "System Preferences" to if it is running then quit
return
From here:
https://discussions.apple.com/thread/8247628
But updating my system to Catalina 10.15, the arrangement of the System Preferences window changed. As I understand it, I now need to first go to Accessibility, then to "Display," and then to the "Color Filters" tab, and then toggle it.
How might I go about doing this?
Any help would be really appreciated!
MacBook Pro 13", macOS 10.15