Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
tell application "Mail" (* Change MailTasks into the name of your calendar *) set theCalendar to "MailTasks" set theMessages to selection repeat with msg in theMessages set msgsubject to subject of msg set msgurl to "message://%3c" & (message id of msg) & "%3e" try tell application "iCal" set newTodo to (make new todo at end of todos of calendar theCalendar) tell newTodo set summary to msgsubject set url to msgurl end tell end tell end try end repeat end tell
This paste will be private.
From the Design Piracy series on my blog: