ASObjC Runner — and Mavericks
ASObjC Runner.app works in OS X versions 10.6 thru 10.9. However, the introduction of AppleScriptObjC-based libraries in Mavericks effectively removes the need for the AppleScriptObjC side of the application, and over time script libraries should obviate the need for the vanilla side. With that in mind, future updates will be limited to bug-fixes, and support will not continue beyond 10.9.
If anything, this means it will become even more important to pre-Mavericks users, offering a convenient way for them to run code they could not use so easily otherwise.
ASObjC Runner — Scripting Power in Two Flavors
ASObjC Runner.app (pronounced as-ock; the b and j are both silent) is an application with a split personality. It was originally designed as a helper application to make it easy to use AppleScriptObjC code in AppleScript scripts. This puts the power of the Mac OS Cocoa frameworks in the hands of scripters.
But mastering AppleScriptObjC is not something everyone has the time or inclination to do. And frustratingly there are many everyday scripting requirements that are either beyond vanilla AppleScript, or require a lot of code and/or running time. That’s where ASObjC Runner’s other personality comes into play.
In this guise, ASObjC Runner is a scriptable faceless background helper application. It has a dictionary with a range of commands focused on the areas where vanilla AppleScript comes up short. You use it like a scripting addition, except you address the commands to the application. (In fact, this is the approach Apple suggests instead of scripting additions.)
As an application, ASObjC Runner cannot introduce terminology conflicts with your scriptable applications. Installation and quitting are straight forward. It can automatically check for updates, and download new versions. And if you decide you need to go further and include some AppleScriptObC code, there is no need for another component. It does require Snow Leopard or later to run.
ASObjC Runner’s dictionary is divided into six suites, addressing different areas.
The Runner Suite addresses three shortcomings of vanilla AppleScript: the lack of a progress dialog, the difficulty of getting screen details when more than one screen is connected, the inability to query modifier keys, and the inability to perform basic trigonometry.
The String Suite addresses shortcomings in text handling. In particular, it covers areas like changing case — something basic that vanilla AppleScript cannot do — and encoding and decoding required for URIs, XML and HTML. It also includes support for regular expression searches, and for formatting of numbers and dates.
The List Suite covers two big ommissions from AppleScript: sorting and filtering. AppleScript is also notoriously slow with longer lists, so it includes other useful commands for manipulating lists.
The File Suite provides help managing files. The Finder is notoriously slow, and System Events has quirks and limitations. ASObjC Runner’s commands simplify file moving/copying/deletion and path and name manipulation, and includes a command to list the contents of folders with filtering. It also handles reading and writing of property list files.
The Record Suite is new in version 1.9.3 and provides commands for manipulating records. You can use strings as record labels, remove items from a record, and more.
The XML Suite is new in version 1.9.5 and provides a subset of the functionality of Late Night Software's XSLT Tools.osax. This lets you perform XPath queries and XSLT stylesheet transforms.
Along the way, there are a raft of other features...
To install it, just drag it to your Applications folder. When you first run it, you can set whether it displays an icon and menu in the status area of your main menu bar (a good idea if using it for AppleScriptObjC, unnecessary if using it as a scriptable helper application).
Then it’s a matter of opening its dictionary in a script editor, and you’re set.
ASObjC Runner is free.