back to article Apple pours a cup of JavaScript for its Automator robot

Apple has quietly started toying with the idea of using JavaScript as a task automator in the Yosemite version of OS X. In this pre-release API document, Cupertino outlines JavaScript for Automation. It's an OSA component that the document says “can be used from Script Editor, the global Script Menu, in the Run JavaScript …

  1. ThomH

    It's a sensible development

    OS X is already a fully scriptable OS and JavaScriptCore has elevated Apple's JavaScript implementation to a system-level framework. Joining the dots probably took all of five minutes.

    1. sabroni Silver badge

      Re: OS X is already a fully scriptable OS

      What are you saying? There's already a scripting language for OS X or just that it has the necessary hooks?

      1. ThomH

        Re: OS X is already a fully scriptable OS @sabroni

        There's already a scripting language, imaginatively titled AppleScript, which first appeared at the start of the '90s. Then there's the Automator, from the mid-'00s and which this article mentions, which provides a graphical way of wiring applications together. I would imagine the latter is more commonly used than the former nowadays but it's just a code generator underneath.

        1. sabroni Silver badge

          Re: OS X is already a fully scriptable OS @sabroni

          Ah, so this is just adding a more popular language so people don't have to learn Apple script or use graphics. Interesting. Thanks for the reply!

  2. Dan 55 Silver badge
    Childcatcher

    They missed a trick

    I'd have thought they'd have gone for Swift, that way they'd have made it easy to pick up instead of making people dive into the deep end with XCode.

    You know, where are their future developers going to come from and all that.

    1. TheOtherHobbes

      Re: They missed a trick

      You don't need Xcode to write JavaScript.

      Apple used to have an entire JavaScript toolchain for making OS X widgets. That was back in 10.5 or so. Last time I tried it, it had stopped working, but it wouldn't take much to revive it.

      Currently you do need Xcode to write/run Swift.

      1. Dan 55 Silver badge

        Re: They missed a trick

        I mean if someone were interested in learning Swift they'd need to use XCode but if Swift were in included in Automator as well it'd be much more accessible. They should have used Swift as Automator's second scripting language, not JavaScript. JavaScript's already in the browser anyway.

  3. Kristian Walsh Silver badge

    Go where the users are...

    JavaScript is widely understood by anyone who's ever cobbled together a website, so that's one advantage over Swift.

    Also, unlike Swift, JavaScript isn't controlled by Apple, and thus won't get dumped just as you've put enough hours into it to become competent in it (Apple have a very bad track record in this). The corollary is that the long hours spent becoming more competent with JavaScript will benefit many other projects you might have to work on; not so with Swift.

    Another advantage, considering the fields where most of Apple's OSX users actually work, is that Photoshop's extensive scripting features also use JS.

  4. Anonymous Coward
    Anonymous Coward

    Roll on the exploits!

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like