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

 
Applescript to add Entourage message(s) to your inbox Thread Tools Search this Thread Display Modes
Inspired by zooids' post from yesterday regarding adding messages from Mail to your Inbox ( http://forums.omnigroup.com/showthread.php?t=3783 ), I thought I would provide those of us who use Entourage the same luxury.

This script allows you to select one or more messages and will make a new task in your inbox for each message selected using the subject of the email as the task title, and the contents of the email as that task's notes. Also, post-import, it switches you to OF, switches your view to Projects and then to your Inbox. Unfortunately it accomplishes this last step using System Events (if anyone out there has the applescript savvy to switch to your inbox via reference, i would appreciate it - while i can switch to /focus on folders and projects, the inbox appears to be its own beast).

This script does not set context or project, but for speed and accuracy sake, I would rather do that from OF's Inbox. Note: if I am missing something re:OF and the way it displays items without those two pieces of info, please let me know and I will adjust the script as necessary.

The way I use it is when I'm out and about, I email myself tasks with the task title as its subject and content being optional. Then when i get back, select them all and hit control-I and I'm rolling...

Anyway, installation is simple: place the unzipped script in your ~/Documents/Microsoft User Data/Entourage Script Menu Items/ directory

You can rename it if you wish; I put an [OF] so it sorts to the top and groups with more OF scripts as they become available.

I have also assigned it a keyboard shortcut of control-I for import (which you can change by altering the last couple of characters in the filename; as always beware of conflicts)

This has been tested with Entourage 2004 on POP, IMAP and Exchange messages.

Enjoy...


I have moved it to my webpage along with a couple other scripts at: http://www.sandro.org/omnifocus/index.php

Last edited by spnyc; 2007-06-23 at 08:42 AM.. Reason: more descriptive title
 
Spnyc

Thanks so much for sharing this. I spotted it when you first posted it and was pleased to find that somebody had already done something that I would otherwise have had to do for myself.

My invitation arrived this morning, I downloaded and installed OF and immediately downloaded and installed your script. It seems to be working fine though I did get a couple of system event errors on the first attempts. I'll keep an eye out for those and see if I can work out what caused them.

This is great timesaver for me - both on the effort I'd have needed to write a script and on the regular use. Thanks again.
 
Quote:
Originally Posted by palbion
It seems to be working fine though I did get a couple of system event errors on the first attempts. I'll keep an eye out for those and see if I can work out what caused them.
My pleasure and glad I could help out in your day to day workflow. It really has helped me capture more info while I'm on the run...

As for the error, you need to be running at least 10.3 (which shouldn't be an issue considering OF requires 10.4) and also enable assisted devices in Universal Access.

http://www.apple.com/applescript/uiscripting/index.html

Please let me know if that fixes your issues.
 
Universal access is probably the clue I needed. The error appeared on my office iMac where I will not have that enabled. I had no error on the iMac I'm using at home where I had enabled universal access scripting when I was tinkering with iGTD. I'll make the change in the office tomorrow.
 
I have moved it to my webpage along with a couple other scripts at: http://www.sandro.org/omnifocus/index.php
 
Quote:
Originally Posted by spnyc
Unfortunately it accomplishes this last step using System Events (if anyone out there has the applescript savvy to switch to your inbox via reference, i would appreciate it - while i can switch to /focus on folders and projects, the inbox appears to be its own beast).
I think this should be what you are looking for. Let me know if I've misunderstood, though =)

Code:
tell application "OmniFocus"
	tell first document window of front document
		set selected view mode identifier to "project"
		tell sidebar
			select inbox
		end tell
	end tell
end tell
 
Quote:
Originally Posted by Tim Wood
I think this should be what you are looking for. Let me know if I've misunderstood, though =)
Thanks so much for that snippet. I must have tried every other possible permutation of selecting the inbox with no success (clearly). I believe I can now stop pounding my head against the wall ;)

I've updated the script on my page:
http://www.sandro.org/omnifocus/index.php

Note: the universal access requirement from the posts above is no longer a requirement.
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
Send to Inbox from the message window Ward OmniFocus 1 for Mac 2 2009-03-31 05:51 PM
Applescript access to tasks in inbox dmcg OmniFocus Extras 2 2009-01-09 08:44 AM
Getting a Hyperlink of the Last Sent Message from Mail.app using Applescript DataGazetteer OmniFocus Extras 1 2008-05-22 04:48 AM
Send Mail message (with link) to OF Inbox zooids OmniFocus 1 for Mac 19 2007-11-20 05:49 PM
Create Entourage Message from OF Task spnyc OmniFocus Extras 1 2007-10-20 07:48 PM


All times are GMT -8. The time now is 01:15 PM.


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