JavaScript for OS X Automation: Exotic Recipes - JXA Cookbook
The future of OS X automation looks quite powerful with UIAutomation introduced to iOS, and now to OS X. JXA can even use npm
modules and CoffeeScript. JavaScript is broadly available and does not replace AppleScript, but comes in addition. We can now script the StandardAdditions
with JavaScript, which means we can do quite a lot of stuff. People try to figure this stuff out at the moment. We’ll see where it goes.
For the time being, though, there is not much documentation available, and we’re pretty much off to explore everything by ourselves. There are a couple of good starting points:
- JXA Cookbook
- Slightly more advanced is Michael Crump’s "JavaScript for OS X Automation by Example", which I personally found very helpful, because it doesn’t contain one example only, but a few, and it leaves out all the basics.
- Alex Guyot’s "Introduction to Automation on Yosemite". You can tell from the first few paragraphs that Alex is not a huge scripter, and that he’s very new to OS X scripting. His intro starts at the very basics.
I would recommend that you start with Alex’s piece, long but worth it for the basics, then read Michael’s post, then head over to the Cookbook.