View Single Post
Quote:
Originally Posted by Alex Brown View Post
In leopard you can drag a mail item into the note of an action, which creates a link back to the mail item. Almost there!.
I would also love to know exactly how you do this. I'm trying with Mountain Lion and dragging the mail gives you a nice envelope cursor, dropping it in a note in either OmniFocus or OmniOutliner sometimes works perfectly and sometimes does nothing.

Over in the OmniOutliner forum Yury & Rob have created scripts that can copy a message link to the clipboard:

Quote:
Originally Posted by RobTrew View Post
For an RTF version of the link, including the subject of the email, you could write something like:

Code:
tell application "Mail"
	activate
	set lstSeln to selection
	if lstSeln ≠ {} then
		tell item 1 of lstSeln
			set strURL to "message:%3C" & message id & "%3E"
			set strHTML to quoted form of ("<font face=\"helvetica\"><a href=\"" & strURL & "\">" & subject & "</a></font>")
		end tell
		do shell script "echo " & strHTML & "  | textutil -format html -convert rtf -inputencoding UTF-8 -stdin -stdout | pbcopy -Prefer rtf"
	end if
end tell

Last edited by andeye; 2013-01-07 at 09:37 PM.. Reason: I now find dragging sometimes works and have a better script