(* OmniFocus Selected Mail Messages.applescript Copyright (c) 2015 Jonathan 'Wolf' Rentzsch: http://rentzsch.com Some rights reserved: http://opensource.org/licenses/mit Pure AppleScript reimplementation of OmniGroup's Clip-o-Tron for OmniFocus. Hopefully this implementation will be more resilient against OS X, Mail, and OmniFocus updates. Successfully tested against OS X 10.10.1, OmniFocus 1.10.6, and OmniFocus 2.0.4. References: *) tell application "Mail" set _sel to the selection repeat with _msg in _sel set _msgSubject to _msg's subject set _msgBody to _msg's content set _msgSender to _msg's sender set _msgURL to "message://<" & _msg's message id & ">" tell application "OmniFocus" tell quick entry set _task to make new inbox task with properties {name:_msgSubject, note:_msgBody} tell note of _task insert "From: " & _msgSender & " Original Message" & (ASCII character 10) & (ASCII character 10) at before paragraphs set value of attribute "link" of style of characters -1 thru -17 of first paragraph to _msgURL end tell end tell end tell end repeat end tell tell application "OmniFocus" tell quick entry to open end tell tell application "System Events" to keystroke tab