PDA

View Full Version : Applescript to add Entourage message(s) to your inbox


spnyc
2007-06-09, 09:07 AM
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

palbion
2007-06-13, 01:32 AM
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.

spnyc
2007-06-13, 05:31 AM
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.

palbion
2007-06-13, 05:49 AM
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.

spnyc
2007-06-23, 09:41 AM
I have moved it to my webpage along with a couple other scripts at: http://www.sandro.org/omnifocus/index.php

Tim Wood
2007-06-23, 10:05 AM
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 =)


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

spnyc
2007-06-23, 11:10 AM
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.