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

 
MailSmith & OmniFocus Thread Tools Search this Thread Display Modes
I have modified the OmniGroup's Mail script to support MailSmith. Attached is a detailed pdf describing the script and how to make it work with MailSmith.

Please read the script itself, as I have modified it's functionality in two places:
o It does not include the contents of the message as part of a task (my workplace appends a disclaimer to each message, which was being included)

o It also does not filter based on an allowed sender list, although if you leave on the "OmniFocus:Preferences:Mail:Add Mail Rule to create OmniFocus actions" check box, you can uncomment this section to activate it.

Please let me know of any problems you may encounter with this, and enjoy:-)

Jeffrey

--- NOTE - The forum won't allow me to post the pdf with pictures (it's 157kb), so I am enclosing the text portion and the pictures will be posted separately


- Create the following script using Script Debugger or Script Editor
- -- Copyright 2007 The Omni Group. All rights reserved.
-- Modified 2008 by Jeffrey Kane for MailSmith 2.1 support,
published with permission
--
-- $Header:
svn+ssh://source.omnigroup.com/Source/svn/Omni/branches/OmniFocus/
1.x/OmniGroup/Applications/Focus/App/Preferences/MailAction.apples
cript 96639 2008-01-01 07:16:24Z bungi $

on process_message(theMessage)
local theSender, trimmedSender, AllowedSender
local theSubject, singleTask, theText

tell application "Mailsmith"
set theSender to address string of originator of theMessage
set theSubject to subject of theMessage
set theContent to content of theMessage
end tell

tell application "OmniFocus"
-- set AllowedSender to allowed mail senders
-- if AllowedSender does not contain theSender then
-- return
-- end if

-- bug in OF - 1/3/2008
-- short circuit this sanity check as OmniFocus doesn't define
"allowed mail senders" unless Mail Support is enabled in the OF
Preference Window
-- if this changes we can uncomment this section
--
end tell


set singleTask to false
if (theSubject starts with "Fwd: ") then
-- Whole forwarded messages shouldn't split.
set singleTask to true
set theSubject to text 6 through -1 of theSubject
end if

set theText to theSubject -- & return & theContent
-- NOTE: commented out the email's content of the messsage, as
some workplace mail senders add a disclaimer to each message
which I didn't want included

tell application "OmniFocus"
tell default document
parse tasks with transport text theText as single task
singleTask
end tell
end tell
end process_message

on FilterMessage(theMessage)
local m, n
try
my process_message(theMessage)
on error m number n
beep 3
display dialog "Exception in MailSmith action: (" & n & ") " & m

tell application "OmniFocus"
log "Exception in MailSmith action: (" & n & ") " & (m as rich
text)
end tell
end try
end FilterMessag

* Save the as script in your MailSmith Mail Actions folder (within your
home account "~/Library/Application Support/Mailsmith Support/Action
Scripts/"):
- Within MailSmith set up a new filter:
- Filter Criteria:
- If Subject Starts With --
- Or To Contains +of@
- Filter Actions:
- Run Script MailAction.scpt
- Transfer OminFocus Items
- I created a new mailbox called "OmniFocus Items" to collect all the
tasks after they have been processed, but you could just as easily
transfer them to the trash
- Attach this filter to your (incoming mail) box
- Open the Window:Filters list in MailSmith
- Open the Window:Mailbox List in MailSmith
- Drag the filter onto your (incoming mail) mail box
- Confirm you have the filter attached by clicking on the downward
facing triangle to the right of the filter name
Attached Thumbnails
Click image for larger version

Name:	MailsmithScreen-Filter.jpg
Views:	564
Size:	29.0 KB
ID:	463   Click image for larger version

Name:	MailsmithScreen-Confirm.jpg
Views:	545
Size:	7.6 KB
ID:	464  

Last edited by Kane; 2008-01-13 at 04:51 AM..
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Omnifocus 1 AppleScript problem after Omnifocus 2 install Cypher OmniFocus 2 for Mac (Private Test) 2 2013-10-18 10:07 AM
Excellent! Will now solely use Omnifocus 2 only with my IOS Omnifocus products kerryd OmniFocus 2 for Mac (Private Test) 7 2013-04-17 03:47 PM
Due date grouping in Omnifocus vs Omnifocus for iPhone arnthorsnaer OmniFocus 1 for Mac 3 2011-03-16 12:53 PM
Beginners guide - using omnifocus to find a personal strategy of how to use omnifocus wayne4 Applying OmniFocus 7 2008-11-14 06:22 AM
Export: OmniFocus Archive vs OmniFocus Document steve OmniFocus 1 for Mac 3 2008-11-07 05:43 PM


All times are GMT -8. The time now is 03:56 AM.


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