With yesterday's update of the iWork suite for OS X, Apple reintroduced several AppleScript functionalities that had been removed in October, and brought new scripting features to Pages, Numbers, and Keynote as well.
Ben Waldie published an overview of the changes at Macworld, noting that the AppleScript improvements aren't only focused on additions: Apple is now using a consistent AppleScript dictionary that should allow scripts to be easily reused across all iWork apps.
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.
When Apple relaunched iWork last year, they stressed how the apps had been rebuilt with full 64-bit support and a new unified file format. The return of AppleScript in iWork seems to highlight – as Waldie notes – a collaboration between different teams at Apple to improve consistency between apps, data exchange, and scripting features.
It took six months, but AppleScript appears to be alive and well at Apple. It may not be a priority anymore, and there's no denying that Apple put power users through a rough transition last year, but the new scripting capabilities of the iWork apps are fairly impressive and it sounds like there's still room for improvement.