Methods to get around having to use UI Scripting


Daniel Jalkut describes how he figured out a way to toggle the VoiceOver preference “Use greyscale”.

What is probably more interesting that the actual way to toggle that preference (unless you actually want it) is his description of how to figure out what calls the system is making and how to make them using python importing frameworks (the same technique would work with JXA presumably).

Some of you impressive coders on here might like to add these tricks to your toolbelt.

Of course, using private APIs (as is done in this case) is not something I would do in Keyboard Maestro, but it is certainly something you can do in a script run from Keyboard Maestro.


Good piece. Thanks for the link.