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

 
Script question Thread Tools Search this Thread Display Modes
Hi,

I am having a look at the evaluation copy of Omnifocus and it will do pretty much what I want with the exception of one thing. I have a rule on a work machine that will send an email to a special account that I have setup for OmniFocus to process. It does this well BUT I need the sender of the email to be included in the copy that is pasted into the Omnifocus event. Any easy way to do this? I also will on occasion have the need for Omnifocus to accept an attachment that is part of some of these emails and include it as part of the text of the body of the email. Thanks in advance.

d
 
Quote:
Originally Posted by roontoon View Post
Hi,

I am having a look at the evaluation copy of Omnifocus and it will do pretty much what I want with the exception of one thing. I have a rule on a work machine that will send an email to a special account that I have setup for OmniFocus to process. It does this well BUT I need the sender of the email to be included in the copy that is pasted into the Omnifocus event. Any easy way to do this?
Yes, it is a one-line change to the MailAction.applescript file found in the application bundle to get this behavior. You then make up an additional mail rule which is similar to the one you use now to get email into OmniFocus, except the filter conditions will be different, it will be earlier in the list of rules, and it runs your modified script instead.

Quote:
I also will on occasion have the need for Omnifocus to accept an attachment that is part of some of these emails and include it as part of the text of the body of the email. Thanks in advance.

d
I do not know of an easy way to do this, though it may be possible with some work. The parse tasks verb used to convert text to actions won't do anything with attachments, but you can determine if the message being processed has attachments, and so with suitable programming you could parse the message into an action, get a handle on it, and attach the attachment(s).

As an easier approach, you might simply wait until you are at your Mac and use the Clip-o-tron to grab the message and its attachments. Use the email feature above to send yourself an action to do it.
 
I suppose it would be even more helpful to tell you how and where to make that one-line change, right? :-)

In the Finder, select the OmniFocus application. Right-click or use the gear menu and select Show Package Contents. Double-click on the Contents folder in the window that opens, then double-click on the Resources folder in the next window that opens. There's a file called MailActions.applescript in that folder. Make a copy of it, suitably named and located (you'll need to point your new Mail rule at it, and if it isn't buried in the application, you may not have to recreate it each time you update the application(*)). Use the Applescript Editor (aka Script Editor if you are using Leopard, IIRC) to change the script:

Before:
Code:
		set theSubject to subject of theMessage
		set singleTask to false
		if (theSubject starts with "Fwd: ") then
			-- Whole forwarded messages shouldn't split.
After:
Code:
		set theSubject to "From:" & theSender & " " & subject of theMessage
		set singleTask to false
		if (theSubject starts with "Fwd: ") then
			-- Whole forwarded messages shouldn't split.
Click the Compile button to make sure you haven't made any typos, then save the file. Make a new Mail rule that runs this script instead of the normal one when it detects a message that should have this handling. Make sure you've got the sending addresses listed in the Mail preferences in OmniFocus.

(*) It would still be a good idea whenever you download a new release of OmniFocus to compare the MailAction.applescript file with your edited one, in case they have made any changes.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about Later Script kingsinger OmniFocus Extras 4 2013-04-02 10:07 PM
setting project + context via script (modifying a DEVONthink script) bernd OmniFocus Extras 2 2012-09-08 01:10 PM
Email/iOS/Mailtags Question... more GTD question more than OmniFocus filmgeek Applying OmniFocus 3 2010-11-06 07:00 AM
Script Help cjlemonier OmniOutliner 3 for Mac 0 2009-09-16 09:45 AM
Script Help gcrump OmniOutliner 3 for Mac 4 2007-06-21 04:42 PM


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


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