So why don’t we replace AppleScript?

So AppleScript sucks. What’s the alterative?

I don’t get why Apple hasn’t seriously entertained a “next generation” scripting engine, in particular one based on JavaScript. All the things are there:

There’s the “canonical” JavaScript OSA component but it doesn’t fit the criteria: it uses Spidermonkey, not Squirrelfish/JavaScriptCore. Still, its API is pretty spot-on (since it’s an OSA component). It’s also pretty old.

JSTalk is another contender. It’s sort of the opposite number of the JavaScript OSA: it uses entirely modern, native components – stuff Apple almost literally has laying around – but does not feature an OSA-compatible API (as near as I can tell anyway). But, it’s modern and very friendly with Cocoa.

The sweet spot is the fusion of the two; the “already works on top of an OSA layer” of the former and the “all the modern stuff” of the latter.

Someone at Apple please make this happen! Make scripting the Mac awesome.

2 thoughts on “So why don’t we replace AppleScript?

  1. I’ve been a big fan of Applescript for a few years now. Yes, Applescript is not ‘proper’ scripting. Yes, there are heaps of things you cannot do with Applescript. Yes, Applescript can be bloody frustrating. But for someone like me — with no programming background — Applescript has been brilliant. I have saved myself, and others, LITERALLY hundreds of hours of tedious, repetitive work in a publishing environment thanks to Applescript. This is only because the software I use has an excellent Applescript dictionary and lots of online resources — but without Applescript, I would have split my skull open long ago through shear banging-against-brick-wall angst.


    1. Well, much of this is academic at this point because it looks like the Sandbox implementation will effectively kill the notion of open scripting of applications on the Mac.

      If I had to guess, they’re going to kill open scripting interfaces entirely in favor of some sort of Automator thingee: instead of publishing an AppleScript dictionary for your app, you’d publish Automator actions. One assumes Apple has either decided regular people don’t script things or scripting applications is a gateway drug to security hell, and with rising marketshare they can’t afford the risk.

      The other alternative is they’re going to simply replace the OSA entirely, and they haven’t let on how that’s going to work; but they’ve decided pulling the bandaid off is the best solution, hence the rather sudden “no more scripting if you want to sell through the App Store”.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s