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 Today's Posts

 
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
 
This update adds better support for Mail Act-On that helps with faster link-back. New options include the ability to change the prefix of generated actions and to easily adjust the amount of message content included in the action's note.

Download it from my software page.

See the included installation instructions for use with Mail Act-On to get better performance.

(smew, I tried to add the prompt for action description that we talked about. Unfortunately that causes Mail to crash. :-( I'm hoping that the new version of Mail has better scripting support.)
 
Hi Curtis,

The script does work with my imap account but only, if the message is in the inbox. If the message is moved to e.g. the archive folder of the imap account, the back link does not work. It doesn't matter if i add the task by mail-act-on or by the script (after manually moving the message to the archive). Everything works perfect, if i'm using a folder under "On My Mac".

You don't use imap so i guess you can't help me. But do you have any tips or hint for debugging?
 
Quote:
Originally Posted by Obyor
The script does work with my imap account but only, if the message is in the inbox. If the message is moved to e.g. the archive folder of the imap account, the back link does not work. It doesn't matter if i add the task by mail-act-on or by the script (after manually moving the message to the archive). Everything works perfect, if i'm using a folder under "On My Mac".

You don't use imap so i guess you can't help me. But do you have any tips or hint for debugging?
Obyor (and anyone else with IMAP accounts that wants to help debug this),

Try creating and running the following Applescript:

Code:
tell application "Mail"
	return name of every mailbox of first imap account
end tell
Let me know what values are returned. Private message is fine if you don't want to create noise in the thread.

Thanks!

Cheers,

Curt
 
 




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 09:49 AM.


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