The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Create Links Back to Mail Messages Thread Tools Search this Thread Display Modes
Howdy Geniuses,

I have what I bet is an easy one for you experts...

You know how when you clip something into OF from Mail and it contains a link that will open the specific message in Mail when clicked?

I'm writing a script to push some stuff into OF from Mail and I want to replicate that but I'm not sure of the syntax.

Does anyone know?

Here's my most recent attempt:

set theCombinedBody to "Message: message://<" & message id of eachMessage & ">" & return & return & theNotes

this doesn't work - the 'message id' property appears to be the unique ID from the mail server, not something Mail can use to open the message.
 
The following proof of concept seems to do the trick for me:

Code:
tell application "Mail"
	tell message viewer 1
		tell message 1 of inbox
			set theStr to "message://%3c" & message id & "%3e"
		end tell
	end tell
end tell

tell application "OmniFocus"
	tell front document
		make new inbox task with properties {name:"test", note:theStr}
	end tell
end tell
It produces the same URL text that the OmniFocus Clip-o-Tron does. It won't work on an iOS device, but it should work for the Mail app on the Mac. If you're trying to do links to multiple messages, you need to extract the message id from each one in turn and generate a link.
 
Awesome, just what I was looking for. Thanks!
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Links back to Entourage messages have disappeared gokubi OmniFocus Extras 0 2010-08-10 07:35 AM
Send MULTIPLE MAC mail messages at one to Omnifocus groogan OmniFocus 1 for Mac 1 2010-04-27 01:04 AM
Some links to email messages in Mail.app doesn't work Tibor OmniFocus 1 for Mac 9 2009-01-22 02:31 PM
Links to Mail Messages - Any Way to Create JUST a Link? adgirard OmniFocus 1 for Mac 2 2008-04-21 09:47 AM
Auto-Clip Mail Messages from a Folder? jdh OmniFocus 1 for Mac 0 2007-11-20 03:14 PM


All times are GMT -8. The time now is 02:22 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.