3 ms·
It's also available for system automation [1], which is a highly underrated (IMHO) part of the Mac system. For my application (URL in bio), I wrote a shell scr
by ken 9y ago
It's also available for system automation [1], which is a highly underrated (IMHO) part of the Mac system.
For my application (URL in bio), I wrote a shell script that (mostly) automatically generates the screenshots for the Mac App Store. It uses osascript(1) with some JS to set the system colors/wallpaper/language to a particular style, position the app window where I want it, take a screenshot, block out my menubar extras, crop it to the requested size, etc.
OSA scripting is actually pretty powerful, but sadly the documentation is awful. Try:
osascript -l JavaScript -e 'Application("System Events").appearancePreferences.appearance = "graphite"'
(or "blue")
[1]: https://en.wikipedia.org/wiki/AppleScript#JavaScript_for_Automation https://en.wikipedia.org/wiki/AppleScript#JavaScript_for_Aut...