Even though AppleScript itself might not be my favorite language, the ability to script applications on the Mac never ceases to impress me. By opening up their apps to scripting, developers allow users to do all kinds of things that either wouldn't otherwise be possible, or, better yet, that enable workflows tailored to their own needs and styles of application use.
A great example of this is my own personal use of Potion Factory's excellent task management app, The Hit List. Upon reading over the feature list soon after starting to use it, I discovered that you can drag web URLs out of your browser onto THL's app icon in the dock to create a new todo item to read the link in question.
I tend to queue up a lot of web reading for later, so I wondered if it would be possible to reduce the amount of work required to a single keystroke. My solution consists of three main pieces:
- The scriptability of both Safari (my preferred browser) and THL.
- Red Sweater Software's excellent FastScripts application, which allows for assigning keystrokes to scripts.
- The command-line utility growlnotify, which comes with the desktop notification system Growl.
I was able to combine the three so that by hitting Command-Option-Control-I, the current Safari URL is sent to THL as a new todo in the inbox, posting a Growl notification with the page title to confirm that things went ok.
You can download the script here. Just put it someplace that FastScripts can get to, such as in ~/Library/Scripts, and assign a keystroke to the script in that application's preferences.
My Delicious bookmarking application, Pukka, enjoys a fair amount of AppleScript popularity for integrating with organizational apps such as Yojimbo and DevonThink and I'm hoping that the next release of Meerkat, which adds AppleScript support to that app as well, will fare similarly as it too can be a workflow-oriented application. The lesson of scriptability is one that I have taken to heart and I hope to maintain a high level of scripting support in all of my current and future applications.