Subscribe / Unsubscribe Enewsletters | Login | Register

Pencil Banner

Latest iWork update is another win for AppleScript

Ben Waldie | April 3, 2014
Late last year, Apple generated a wave of negative press after releasing slimmed down Mac versions of the iWork apps--Keynote, Numbers, and Pages. Rewritten from the ground up to focus on ease of use, consistency, and iCloud support, the apps lacked lots of the useful productivity features that Mac users had come to use. One major setback was a significant reduction in AppleScript support, a problem for anyone attempting to automate an iWork-based office workflow.

However, the most exciting news is that Keynote, Numbers, and Pages all introduce brand new text and iWork suites of terminology, allowing for interaction with text and common elements such as charts, images, tables, lines, placed audio files, and more.

What's especially interesting is that these suites are consistent from app to app. In other words, since all the apps have certain features in common, the same exact AppleScript terminology is used to script those features. This is huge: It means that if you write a script that builds a table or chart in Numbers, you can change the app name in your code to Keynote and your script should "just work" in Keynote. Want to add an image, replace some text, change the volume of every movie in a document? The code you write is the same for any of these tasks, regardless of which app you're targeting. Of course, app-specific features still have their own custom non-shared terminology; for example, Pages doesn't have terminology for working with Keynote slides or entering presentation mode.

The universal approach that Apple is taking with a shared scripting implementation is truly awesome, as it makes learning how to automate the iWork apps easier and allows for more modular, reusable code. Its implementation couldn't have been easy, and Apple's iWork development team deserves a lot of credit for pulling it off. The iWork apps are presumably built by different sets of developers, and I'm sure it required lots of close collaboration, planning, and attention to detail to generate shared consistency at this level. I'd love to see more developers embracing scripting language consistency like this.

Even the iWork AppleScript dictionaries themselves received some useful improvements, aside from just displaying the new terminology. They now include formatted HTML-based help content and example code snippets. Although the implementation of these features is pretty limited at this point, it's hopefully a sign of more to come in later releases. If you've ever tried to decipher a cryptic AppleScript dictionary, I'm sure you'll be excited about this prospect.

While this latest round of AppleScript enhancements continues to push iWork forward, as always, there is still room for improvement. Specifically, text alignment and the ability to create lines or adjust the background fills of shapes isn't currently supported. Still, this release lays really solid groundwork for robust AppleScript support into the future. For now, I'm celebrating this latest victory for AppleScript, and I can't wait to see what comes next.


Previous Page  1  2 

Sign up for CIO Asia eNewsletters.