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

 
Send Mail message (with link) to OF Inbox Thread Tools Search this Thread Display Modes
Thought I'd share this applescript that sends the current selected message in Mail to the Inbox. It includes the context of "Mail" and note with a link back to the message.

Be sure you edit the script to change the context to match yours. Also, you must create the context in OF before the script will function.

Here's what I've found as a best practice in using this:

1. Setup a Mail Act-On Rule to run the script and (optionally) move the message to an "actionable" folder.

2. OF will now have an new inbox task with a name based on the subject, sender, and 1 line summary of the email. In the notes field will be the link back to the Mail message.

3. To easily switch directly to that message, Select All in the note field of the task and press your QuickSilver shortcut to "Command Window with Selection". The default action should be "Open URL". Press return and your Mail message opens in a new window.
Attached Files
File Type: zip Send Mail to OmniFocus.zip (3.1 KB, 1231 views)
 
Very cool, thanks for sharing. I've edited the script so that the action created in OmniFocus has no context; that way everything will sit in the Inbox in OmniFocus until I deal with it. (Otherwise, if you click 'Clean Up' and it already has a context assigned, it'll go to that context's lists but not appear in any Project list, which I find very annoying. This way, it'll stay in the Inbox until it's definitely dealt with.)

I also edited it to use em-dashes (—) rather than hyphens (-) between the sections of the action title in OmniFocus. But I know I'm typographically sad.

One thing, though. I don't use Mail Act-On (yet). I copied this script into Mail's scripts folder (~/Library/Scripts/Applications/Mail), but there's no way to activate the script from within Mail itself—it doesn't appear in any of the menus, for example, or on the toolbar. So far I've only run the script from within Script Editor (obviously not a long-term solution, just testing it out). I looked at the DEVONthink scripts in that folder, which do produce items in the 'Message' menu in Mail, but couldn't see anything obvious. Any idea? I'm not an AppleScript maven, I'm afraid.

Thanks very much for this. I was just wondering when we'd see the first OmniFocus AppleScripts!

Richard
 
Quote:
Originally Posted by Richard Flynn
One thing, though. I don't use Mail Act-On (yet). I copied this script into Mail's scripts folder (~/Library/Scripts/Applications/Mail), but there's no way to activate the script from within Mail itself—it doesn't appear in any of the menus, for example, or on the toolbar. So far I've only run the script from within Script Editor (obviously not a long-term solution, just testing it out). I looked at the DEVONthink scripts in that folder, which do produce items in the 'Message' menu in Mail, but couldn't see anything obvious. Any idea? I'm not an AppleScript maven, I'm afraid.
You put the script in the right place, but you need to add the Scripts menu to your menu bar. Here's how (from Mail's help):
Quote:
To add the Script menu to the menu bar, open AppleScript Utility, located in Applications/AppleScript/. Select the “Show Script Menu in menu bar” checkbox. The menu appears on the right side of the menu bar.
 
Quote:
Originally Posted by Richard Flynn
I looked at the DEVONthink scripts in that folder, which do produce items in the 'Message' menu in Mail, but couldn't see anything obvious. Any idea? I'm not an AppleScript maven, I'm afraid.
Richard
The Devonthink applescripts DO show up in the applescript menu. There is a separate Devonthink mail plugin "bundle" that goes in the mail plugins folder that causes that option to show up in the message menu. 2 completely different animals. I would LOVE to see that kind of "plugin" integration.

Also – be aware that placing things in /library/scripts/mail makes things show up system wide in the applescript menu under "mail". Placing things in ~/library/scripts/applications/mail makes things show up in a dynamic applescript menu that only appears when mail is the active application.

Also – run the "applescript utility" in applications/applescript/applescript utility. There are some OS visibility options in there.
 
Quote:
set My_Context to "mail"
What would the syntax be to set the context to a nexted context, ie: @home –> @onLatop –> email?
 
Using quicksilver for the URL bit is very clever. But... It's really cumbersome.

Hey Omni – you are going to add URL support at some point, including "message://", right? Please?
 
Quote:
Does the link back require MailTags? Thanks!
No. Zooids script puts a link in the notes field. It will take you back to the original email wherever you filed it.
 
Quote:
Originally Posted by johnrover
What would the syntax be to set the context to a nexted context, ie: @home –> @onLatop –> email?
I have only been able to get it work for a top level context. I can't wait for someone to take this to the next level.
 
Hmm...
Code:
The variable new_Context is not defined.
But if I remove the context business as suggested in the previous post, it works. I have changed the script so that the message text appears in the note field (with the url) instead of in the task title (with the sender and subject).

Last edited by Craig; 2007-06-08 at 09:26 AM..
 
Quote:
Originally Posted by zooids
3. To easily switch directly to that message, Select All in the note field of the task and press your QuickSilver shortcut to "Command Window with Selection". The default action should be "Open URL". Press return and your Mail message opens in a new window.
Thanks for the script.

I can't get the link to work either via QuickSilver or by the right-click context menu. Anyone else have this problem? Something I'm not getting?
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Send to Inbox" toolbar icon in Mail.app? S. Esch OmniFocus Extras 0 2010-10-18 01:13 AM
Error when you select send mail clipping to Inbox ksrhee OmniFocus 1 for Mac 5 2009-04-22 12:01 PM
Send to Inbox from the message window Ward OmniFocus 1 for Mac 2 2009-03-31 05:51 PM
Link to mail message? JohnJ80 OmniFocus Extras 3 2008-04-21 03:03 PM
"Send to Inbox" is disabled in Mail Ward OmniFocus 1 for Mac 4 2008-01-18 07:17 PM


All times are GMT -8. The time now is 12:16 PM.


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