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 1 for Mac
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
OmniFocus-Mail Links Thread Tools Search this Thread Display Modes
Inspired by zooids post in another thread. I've created a pair of scripts that allow round-trip linking between OmniFocus and Mail.

The pair of scripts here allow you:
• to create OmniFocus actions from messages in Apple Mail
• jump from linked OmniFocus actions back to the Mail message.

Download: the most recent version is available here

Installation
1. Copy the Add OmniFocus Action script into the folder:

~/Library/Scripts/Applications/Mail

creating the folder(s) if necessary.

2. Copy the Open Linked Mail Message script into the folder:

~/Library/Scripts/Applications/OmniFocus

creating the folder(s) if necessary.

3. Add the Scripts menu to your menu bar if you haven't already by opening the AppleScript Utility, located in Applications/AppleScript/, and selecting the “Show Script Menu in menu bar” checkbox. The menu should appear on the right side of the menu bar.

Running
When running Mail, the Add OmniFocus Action item should appear in the scripts menu. Select a message in Mail, then run the script. You should find a new action in your OmniFocus Inbox awaiting a context and project designation.

When running OmniFocus, the Open Linked Mail Message item should appear in the scripts menu. Select a linked action in OmniFocus, then run the script. The mail message should open.

Disclaimer
I haven't tested the scripts with IMAP accounts. OmniFocus is still in alpha testing, so the scripts may break at any time. I suspect that I'll continue to use and maintain them until the Omni Group provides built-in support, so I'm likely to maintain the scripts for awhile at least.

Last edited by curt.clifton; 2007-06-17 at 02:44 PM.. Reason: Changed download link to point to my web page
 
Awesome. This is great. This makes OF twice as useful to me.

One request – does anyone know how to make the script select the message in the main mail window (and have it open in the preview pane) instead of opening it in a new window? It's really helpful to see the message in the context of it's thread / folder / mailtags, etc instead of just opening it.
 
Quote:
Originally Posted by johnrover
Awesome. This is great. This makes OF twice as useful to me.
I'm glad you like it. It was like pulling teeth to get Mail to behave!

Quote:
Originally Posted by johnrover
One request – does anyone know how to make the script select the message in the main mail window (and have it open in the preview pane) instead of opening it in a new window? It's really helpful to see the message in the context of it's thread / folder / mailtags, etc instead of just opening it.
That's a good idea. Let me make sure I understand what you're looking for. You would like the front message viewer window in Mail to switch to the mailbox of the linked message with the linked message selected. Is that right?

Should the current behavior of opening a new window also be retained as an option? I can imagine some people not wanting the script to change what their message viewer is already displaying.
 
Haven't tried it but like the jail bird says... "That is hot!"

BZ
 
Quote:
Originally Posted by curt.clifton
That's a good idea. Let me make sure I understand what you're looking for. You would like the front message viewer window in Mail to switch to the mailbox of the linked message with the linked message selected. Is that right?
Yes!

Quote:
Originally Posted by curt.clifton
Should the current behavior of opening a new window also be retained as an option? I can imagine some people not wanting the script to change what their message viewer is already displaying.
[/QUOTE]

To be honest, I don't care. I would never use it that way. If I'm linking to something from OF, chances are I'm not already reading a message in mail. And in the few cases where I do want to keep the message I'm reading open, I would open that one first, because I'm already trained to work that way while working exclusively in mail.

The I thinking linking OF to the message in context, highlighting it (thus causing it do display in the preview pane) would be the most "seemless" workflow option. It would make OF feel more like an extension of mail, or vice versa.

Thanks again!
 
OT: Leopard Mail will have some interesting ways to connect to OF: Notes and autorecognition of dates (connecting to iCal) and addresses (connecting to Address Book) could be tapped for some subtle integration.

On Topic: I'd expect to move from OF to Mail with the message displayed in the main (read only) Mail window but could see a modifier key causing it to open in it's own window.
 
Here's a new version of the OmniFocus-Mail Links scripts. This one displays the linked message in the front message viewer of Mail.

Download: the most recent version is available here

(You can change one line in the appropriate script to use the old "open in new window" behavior. The zip file includes instructions for doing this.)

Last edited by curt.clifton; 2007-06-17 at 02:51 PM.. Reason: Changed download link to point to my web page
 
Nice job! Thanks for updating the scripts.
 
Quote:
Originally Posted by zooids
Nice job! Thanks for updating the scripts.
Thanks for the inspiration!

I probably should have just sprung for MailTags, and I still might, but it was fun to figure out how to make the scripts work with the stock version of Mail.
 
Nice work, good integration. Only problem—for me—is that the ID your script generates for messages in Mail only holds true while they are in the same mailbox (folder) within Mail. Move a message, and the link from OmniFocus no longer works. The Message IDs generated by zooids' original script, however, are unique to the message, and don't get broken when you move messages between mailboxes. I do really like being able to open linked messages within the preview pane of the main Mail window, but I think it's more important that the links continue to work, regardless of where you move the message to!

Plus, the latest builds seem to recognize the IDs generated by zooids' scripts as URLs, so you can now right-click on the links in the note attached to an Action in OmniFocus, and choose 'Open URL' to open the original message very easily in Mail.

Hope that makes sense…
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create Links Back to Mail Messages HunterHillegas OmniFocus Extras 2 2011-11-09 12:56 PM
Mail.app Links Breaking chriswitt OmniFocus 1 for Mac 7 2009-02-15 01:29 PM
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
Unable to click on links in e-mail message Shifting Sands OmniWeb Bug Reports 1 2007-06-14 09:07 AM


All times are GMT -8. The time now is 04:56 PM.


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