Sign up FAST! Login

Extensibility and Automation Changes in OS X Yosemite


Extensibility and Automation Changes in OS X Yosemite MacStories

Source: http://www.macstories.net/mac/extensibil...

Beyond extensions, the other main addition to OS X automation is the introduction of JavaScript for Automation (JXA). Before Yosemite, the only language available for scripting apps on OS X was AppleScript, a simple language designed to be as much like plain English as possible. While AppleScript isn’t too hard to pick up, the prospect of starting to learn any new language can be daunting, and JavaScript for Automation removes this road block for many. If you already know the more popular standard JavaScript, jumping into JXA is much easier than learning AppleScript from scratch. That said, JXA is not the same as the JavaScript that you may be used to on the web. JXA is not focused on interacting with a DOM or building web apps. Rather, it extends the JavaScript core language to integrate it with the Open Scripting Architecture (OSA) of OS X.

OSA is a mechanism for inter-app communication between Mac apps, and it is what AppleScript and JXA are built on. The communication occurs by sending “Apple Events” – messages which include commands or data – back and forth between apps. OSA allow Mac developers to create scriptable applications, and it allows any user who knows AppleScript (or, now, JXA) to automate these applications.

Stashed in: JavaScript, Apple

To save this post, select a stash from drop-down menu or type in a new one:

Wow, JavaScript really is becoming the universal programming language.

You May Also Like: