RE: Applescript ToDo
RE: Applescript ToDo
- Subject: RE: Applescript ToDo
- From: John Maisey <email@hidden>
- Date: Thu, 17 Apr 2008 09:05:45 +0100
Does anyone know how to write a script to create new ToDo in Mail
so that a rule can be set up when an email with particular criteria
is received, a new ToDo in Mail/iCal is created?
I don't think you can do it in Mail, but in iCal. Something like:
Thinking about it you're probably wanting something more like:
----
using terms from application "Mail"
on perform mail action with messages myMessages
tell application "Mail"
repeat with myMessage in myMessages
set theTitle to subject of myMessage
set theNotes to content of myMessage
set dueDate to (my (current date)) + 2 * days
tell application "iCal"
make new todo at the end of todos of calendar 1 with properties
{summary:theTitle, description:theNotes, due date:dueDate}
end tell
end repeat
end tell
end perform mail action with messages
end using terms from
----
You'd then set up the rule in Mail to check for the criteria you want
and make the rule open the script.
John Maisey
www.nhoj.co.uk
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden