In my last posting I shared a script I put together to use with the shortcut application Quicksilver to quickly create To-do items in iCal. I am now using this all the time. I have separate scripts, based on the same which create a medium priority “READ: ” to-do for things I want to put on my reading to-do list, a “LOOKUP: ” medium priority script to remind myself of things I want to look up at some point (assigned to a different color calendar), and a high priority to-do script in its own iCal calendar.

Now, what if I’m away from home, am without my laptop computer, but have access to a nearby terminal with an internet connection, and I want to create to-dos for myself. I synch iCal with my Palm pilot so I could easily write down the to-do directly into my Palm. However, Palms are still not fun to use when you have a lot to write down. Today, I was in the Fung library reading some Chinese historical journals and wanted to remind myself to look up a few things I found there and come back and read some articles I didn’t have time for today. There were internet terminals all over the place so instead of entering the titles (in Chinese) on the Palm, which is a pain and time consuming, I emailed myself some email messages with the subject “LOOKUP: ” or “READ: ” and then what I wanted to lookup/read. In the body of the email I put more information, such as a URL or notes to myself. I decided that tonight when I came home I would hack up an applescript that used Apple’s mail filter to automatically find those messages as they arrived in my inbox, create the appropriate to-do in iCal (like the Quicksilver script) with the subject line of the email, put the body of the email into the todo’s notes, and then move the message into an archived folder. The results are below.

The first and last of these can be done with a filter in Apple mail that looks like this:
Apple Mail Rule

The script itself can be downloaded here, and the full text of it is below. You may have to change the name of the calendar you assign it to in order to suit your own needs:

using terms from application “Mail”
on perform mail action with messages theMessages for rule theRule
tell application “Mail”
repeat with eachMessage in theMessages
set theSubject to subject of eachMessage
set theContent to content of eachMessage
try
tell application “iCal”
set newtodo to (make new todo at end of todos of calendar “Projects”)
tell newtodo
set priority to medium priority
set summary to theSubject
set description to theContent
end tell
end tell
end try
end repeat
end tell
end perform mail action with messages
end using terms from