Macs in Chemistry

Insanely Great Science

Applescript in the future

 

Applescript has had to take a bit of a back seat in recent years but there have been a couple of posts recently that will be of significant interest to all scripters.

Papers is a multi-award winning reference management application that hugely popular with scientists. I saw a very interesting entry on their blog.

The latest beta version of Papers for Mac adds support for scripting. This allows you to automate tasks or fetch and manipulate data in your Papers library by using AppleScript, or JavaScipt in Yosemite. Papers 3 features extensive AppleScript support that allows data to be fetched from a Papers library. You can also execute commands, like import and export. You can even create new data and set its most important properties. Some parts of the UI can be automated as well: the current selection can be changed, as well as the current view mode.

The importance of adding Applescript support to applications is nicely illustrated in an article by Brent Simmons, Making Your Mac App’s Data Scriptable.

Scripting isn’t a matter of automating button clicks; it’s about exposing the model layer to people who could use your app in their workflows.

There have been many concerns that the introduction of “sandboxing” will compromise the ability of applescripts to automate complex multi application workflows. There has been a recent article that shows the current best practices for controlling another app using AppleScript, Scripting from a Sandbox.

This comment sums things up nicely

While that’s usually a small minority of users (who use applescript), they’re power users — the kind of people who recommend apps to friends and family. They blog and tweet about apps, and people listen to them. They can be your app’s biggest evangelists.

And of course it is easy to share applescripts. I’ve added the links to the Applescript Resources page.

blog comments powered by Disqus