This works on macOS 11
tell application "System Events" repeat with x in (get name of processes whose visible is true) set visible of process x to false end repeat end tell
along with usage and download details
This works on macOS 11
tell application "System Events" repeat with x in (get name of processes whose visible is true) set visible of process x to false end repeat end tell
along with usage and download details
2021-04-16: Here is one in JavaScript.
THANK YOU SILESKY
Toggle Grayscale
tell application "System Preferences" activate set the current pane to pane id "com.apple.preference.universalaccess" delay 1 # needs time to open universal access tell application "System Events" to tell process "System Preferences" to tell window "Accessibility" tell scroll area 2 to tell table 1 to tell row 6 #open display preferences select end tell click checkbox "Use grayscale" end tell end tell tell application "System Preferences" to quit # Sierra: System Preferences -> Accessibility -> Display -> Use grayscale
Invert Colors
tell application "System Preferences" activate set the current pane to pane id "com.apple.preference.universalaccess" delay 1 # needs time to open universal access tell application "System Events" to tell process "System Preferences" to tell window "Accessibility" tell scroll area 2 to tell table 1 to tell row 6 #open display preferences select end tell click checkbox "Invert colors" end tell end tell tell application "System Preferences" to quit # Sierra: System Preferences -> Accessibility -> Display -> Invert colors
Aliases
Run them from the command line. Maybe make your screen black and white at night or invert colors for screencasts or working in sunligh.
alias togglegrayscale=’osascript /Users/gcr/util/sspadtogglegrayscale.scpt’
alias invertcolors=’osascript /Users/gcr/util/sspadtogglecolors.scpt’
A hardware and operating system implementer, whom I can’t recall, once quipped that using color on computer monitors added no value and was in fact a waste of memory. Interesting. NeXT monitors started out grayscale, I wonder why.
Continue reading “Test Your Emacs Themes In Black And White On macOS”