The PERL Way to Add OmniFocus Inbox Entries from Twitter

Over the weekend I got the bright idea of asking OmniGroup to ask an iPhone voice recognition application (like Dragon Dictation) to add a link to the OmniFocus iPhone application. That way I could simply dictate new inbox items on the iPhone rather than laboriously typing them with the on-screen keyboard. Before making the suggestion, I searched the OmniFocus User Forum for “voice recognition” to see if anyone else had suggested the same thing. As it turns out, there were a few posts that had instructions from people using Twitter as an intermediary. Unfortunately, they either required a desktop Twitter client to be running all of the time or used the now deprecated BasicAuth-based Twitter authentication scheme. So I created my own.

Getting a Hyperlink of the Last Sent Message from Mail.app using Applescript

I’ve been a fan of Getting Things Done as a technique for managing projects, but it was only recently that I settled on OmniFocus as the “trusted system” collecting all of my next actions. One of the things I like about OmniFocus — as a rich, Mac-only application — is its ability to hold links to messages from Mail.app as notes for each action. This occurs, for instance, when you use the “Clippings” function of OmniFocus to create a new action based on the message that you are currently viewing in Mail.app. (There are other ways to do it, such as the method described by Adam Sneller.)

One of the things I find myself doing is creating actions in a “Waiting” context based on e-mail messages I’ve just sent. Initially, I’d just create the action via the OmniFocus Quick Entry window. But I found myself needing to refer back to the message I sent when the person I’m waiting on doesn’t come through. So I started clicking and dragging the message from the Sent mailbox to the action. But to do that I’d have to click into the Sent mailbox and have the Mail.app and the OmniFocus windows set up just right. Or I’d have to follow a select-sent-mailbox, select-message, OmniFocus-quick-entry-with-clipping, select-Inbox, select-next-message workflow. And that took time and effort. So I’ve created an AppleScript ditty that does the work of creating a hyperlink on the clipboard of the last sent message. The results can then be pasted into any RTF-aware application, including OmniFocus.