Create Links Back to Mail Messages
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 [/code] 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!
|
All times are GMT -8. The time now is 03:46 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.