On Wed, Apr 28, 2004, the following words from Marlyse Comte [EMAIL PROTECTED], emerged from a plethora of SPAM ...
Try this - Be careful of the line wraps: <Begin AppleScript> property msgPrompt : "Please select the calendar you wish to create a new To Do in." property replyPrompt : "Reply by email to " property numberList : {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30} to getCalendarChoice() tell application "iCal" set the writableCalendars to the title of calendars whose writable is true try set the listChoice to item 1 of (choose from list writableCalendars with prompt msgPrompt OK button name "This One" without multiple selections allowed and empty selection allowed) on error beep return false end try end tell return the listChoice end getCalendarChoice to makeAToDo(calPick, replyDue, sAddr, replySum) tell application "iCal" set the calVar to the first calendar whose title is the calPick make new todo at the end of the todos of the calVar with properties {due date:replyDue, summary:replySum, url:sAddr} end tell end makeAToDo tell application "PowerMail" set the msgList to the current messages repeat with targetMsg in the msgList set the targetMsgSender to the sender of the targetMsg set the msgSenderName to the display name of the targetMsgSender set the sAddr to the email address of the targetMsgSender set the replySum to the replyPrompt & the msgSenderName set calendarPick to my getCalendarChoice() if not (calendarPick is false) then set the numberGiven to (item 1 of (choose from list the numberList with prompt "How many days to reply?" OK button name "This one" without multiple selections allowed and empty selection allowed)) set the replyDueDate to (the (current date) + (numberGiven * days)) my makeAToDo(calendarPick, replyDueDate, sAddr, replySum) end if end repeat end tell (* The above script will act on the message selected, or list of messages selected in the Mail Browser window. You will get two dialogs; One prompting you to choose a calendar from a list of your editable calendars, The second prompts you to choose how many days until the message is due. The ToDo summary will include the text in the property replyPrompt and the name of the sender of the message. The text of the properties can be modified to; include a different message, scale or extend the list of due date numbers. Modify or fix the script as you will, if it doesn't work as you want. *) <End AppleScript> HTH cheshirekat -- There is something about music that keeps its distance even at the moment that it engulfs us. It is at the same time outside and away from us and inside and part of us. In one sense it dwarfs us, and in another we master it. We are led on and on, and yet in some strange way we never lose control. - Aaron Copland * 867 PowerBook G4 * OS X 10.2.8 * 768 MB Ram * * Addictions: iTunes 4 * WarCraft * The Sims * FileMaker Pro