The state of AppleScript: Let's not panic ... yet

Today's Best Tech Deals

Picked by Macworld's Editors

Top Deals On Great Products

Picked by Techconnect's Editors

It’s that time again. A new version of OS X is out, and with it come the recurring cries of AppleScript’s demise. But let’s try to remain calm: Recent Internet rumors that the sky is falling may be slightly exaggerated. Nobody knows for sure what the future holds, but personally, I don’t think AppleScript is going anywhere just yet.

If you’ve been following the headlines this past week, you may have seen stories like “iWork 13—A Huge Regression,” “AppleScript Support Effectively Gone From New iWork Apps,” and “Mixed AppleScript Signals.” It’s true, the AppleScript support in the latest versions of the iWork apps (Pages, Numbers, and Keynote) has almost completely evaporated overnight. Numbers, which previously had fairly extensive scripting support, now has no AppleScript dictionary at all. Pages’ scripting support has been reduced to a single export command. And Keynote has likewise found its scripting capabilities limited.

AppleScript dictionaries for Pages in iWork '09 (left) and the 2013 version of Pages (right).

The ebb and flow of AppleScript

Losing scripting support in iWork is a real shame. It breaks workflows and produces bad PR for AppleScript. It’s not unprecedented, though. The level of AppleScript support in OS X and Mac apps has changed repeatedly over the years. AppleScript recording in the Finder, for example, was completely broken in OS X 10.0 and wasn’t fixed until 10.3. When Apple migrated from QuickTime 7 to QuickTime X, the app’s AppleScript support was significantly impacted. In fact, QuickTime 7 is still available for download on Apple’s website today, and its great AppleScript support may be one of the reasons.

Other changes have also impacted AppleScript over the years. Most recently, Apple’s security initiatives—Gatekeeper and app sandboxing—have forced both Apple and developers to rethink the ways scripts are launched and shared. And Mavericks implements some additional security restrictions around the way GUI scripting works.

It’s also worth noting that the AppleScript support in Apple’s other apps tends to vary quite a bit across the board. iPhoto and iTunes, for example, have relatively good AppleScript support, while, sadly, iBooks Author and iMovie have none. This lack of consistency, perhaps, represents AppleScript’s biggest hurdle in getting both users and developers to adopt it. Users can’t implement scripts if developers don’t make their apps AppleScript-friendly. And when Apple doesn’t bake support for scripting into many of its own apps, it doesn’t really encourage developers to make their apps scriptable.

iTunes' AppleScript library is still relatively robust.

Despite occasional setbacks over the years, though, AppleScript has a knack for adapting and living on. In fact, AppleScript even received some healthy updates of its own in Mavericks, including Notification Center support, iCloud support, code signing of script apps, the ability to create script libraries, and more. Translation: Apple is still investing time and resources in AppleScript’s advancement. Sure, more could be done, like providing full scripting support in iWork, but the fact that AppleScript is still advancing does bode well for the technology itself.

Forgive me if I seem anxious not to write off AppleScript just yet. I, for one, still have tons of useful scripts outside of iWork that remain fully functional and keep me working efficiently in Mavericks.

Going off script

I suspect this current scripting debacle mainly boils down to two iWork-specific things, rather than Apple signaling a nail in AppleScript’s coffin:

  1. Feature prioritization and deadlines: Apple has simultaneously released brand-new iOS, Mac, and Web versions of the iWork apps. These apps were redesigned from the ground up, possibly by a single team of developers, to offer a consistent user experience across Apple’s ecosystem. There were certain features that had to be implemented to make this happen, and, unfortunately, Mac-only AppleScript support didn’t make the cut. This doesn’t mean it can’t or won’t be added later, but it didn’t make it for this release. Neither did lots of other powerful features, such as Pages’s mail-merge.
  2. A presumably iOS-heavy iWork development team that doesn’t fully realize the need or demand for scripting support: Remember, there’s no AppleScript equivalent in iOS.

My hope is that this scripting regression is temporary, and we just need to allow Apple some breathing room. While I’m certainly disappointed, I’ll be much more upset if I don’t see scripting support returning in future releases.

Again, this pattern isn’t new. William R. Cook, one of AppleScript’s founding fathers, wrote in his 2006 documentation (a great read, by the way) of the history of AppleScript:

When Mac OS X was released in March, 2001, it included AppleScript 1.6. In porting applications and system components to OS X, Apple sometimes sacrificed scripting support. As a result, there was a significant reduction in the number of scriptable applications after the release of OS X. Full scriptability is being restored slowly in later releases.

In the meantime, iWork scripters aren’t completely out of luck. There are some options, albeit not ideal ones:

  1. The latest versions of the iWork apps (iWork ’13, if you will) don’t replace their counterparts from iWork ’09 when installed. You could keep the older versions around for your scripting needs for now and hope that AppleScript support for iWork returns quickly.
  2. You could consider dumping iWork and migrating to Microsoft Office. Word, Excel, PowerPoint, and even Outlook all have extensive and nicely implemented AppleScript dictionaries.

Be heard

I would also like to point out that there are some mechanisms we can all use to let Apple know that AppleScript support in iWork and throughout OS X is important. If you’re a developer who encounters a specific scripting limitation or problem, please document it and submit a ticket through Apple’s Bug Reporter. Apple assesses and prioritizes developer feedback, so this can actually make a difference. If you’re an end-user who wants to provide general feedback, suggestions, or bug reports, you can do so on Apple’s Product Feedback page.

Apple’s focus on simplification and user experience is great, but not when it comes at the expense of efficiency. Complex and repetitious tasks eat up time and money, and many Mac users and businesses rely on tools like AppleScript and Automator to achieve inter-application automation to streamline their workflows. There’s no reason automation can’t or shouldn’t be adequately supported, especially in Apple’s own office apps, which are even categorized in the Mac App Store under Productivity. I’d love to see Apple embrace a consistent approach to automation, as it does with sandboxing, iCloud support, Notification Center support, and more. I think the next iWork update would be the perfect place to start.

Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read our affiliate link policy for more details.
Shop Tech Products at Amazon