News for hackers. Stuff that matters.
Re:JavaScript for OS X Automation by js2 on Wednesday September 17, 2014 @10:50AM (#8330250)
For a while, there was a wonderful third-party alternative to Applescript known as "appscript"[0]. Your example above in Python would've been:

    app('Mail').outgoingMessages[its.subject=='JavaScript']
Appscript also had bindings for Ruby and ObjC.

Unfortunately, Apple deprecated the underlying API in 10.6 that made appscript possible and never provided a suitable replacement[1].

As always though, the problem wasn't Applescript, but rather limited support for Apple Events by applications. Unless that problem is fixed, adding Javascript support to the OSA isn't going to help much.

[0] http://appscript.sourceforge.net/index.html

[1] http://appscript.sourceforge.net/status.html

Edited to add: I see the author of appscript has additional criticism linked to elsewhere from this thread - https://news.ycombinator.com/item?id=8329408

There are no comments on this comment yet.