Skip to content

Instantly share code, notes, and snippets.

@23maverick23
Forked from bobbidigital/gist:51704e6ddda8a58c7a9c
Last active August 29, 2015 14:22
Show Gist options
  • Save 23maverick23/3ab6b3689fe35a1da35f to your computer and use it in GitHub Desktop.
Save 23maverick23/3ab6b3689fe35a1da35f to your computer and use it in GitHub Desktop.
tell application "Airmail 2"
set theMessage to selected message
tell theMessage
set theContent to htmlContent
set theSubject to subject
end tell
tell application "OmniFocus"
tell quick entry
set theRTFMessage to do shell script "echo " & quoted form of theContent & "|/usr/bin/textutil " & " -convert txt -stdin -stdout -format html"
make new inbox task with properties {name:theSubject, note:theRTFMessage}
set note expanded of every tree to true
open
end tell
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment