*This message was transferred with a trial version of CommuniGate(tm) Pro*
Wayne and everyone else. Here's what Marlyse and I ended up with.
<AppleScript>
global theName, theEmail
tell application "PowerMail 5.0b12"
set theMessages to current messages
repeat with msg in theMessages
set theText to sender of msg
set theName to display name of theText
set theEmail to email address of theText
end repeat
end tell
tell application "iCal"
activate
set callist to my get_cal_titles() --get cal titles
set selectedcals to (choose from list callist) as Unicode text --do menu
with cal titles
set theCal to first calendar whose title is selectedcals --identify
selected cal in iCal
set theItem to (make new todo at end of todos of theCal)
set summary of theItem to "eMail ->" & " " & theName
set url of theItem to "mailto:" & theEmail
activate theItem
show theItem
end tell
on get_cal_titles() --gets a list of strings of calendar titles
set list_of_cals to {}
tell application "iCal"
repeat with aCal in calendars
set list_of_cals to list_of_cals & (title of aCal as
string)
end repeat
end tell
return list_of_cals
end get_cal_titles
</AppleScript>
There's not really any error checking and you need to have a received
message selected.
--
Andy Fragen
On Thu, Apr 29, 2004, Wayne Brissette said:
>
>Marlyse Comte [EMAIL PROTECTED] on 29 April 2004 stated:
>
>
>>thanks!
>>
>>Andy Fragen helped me modify my original script which ended in a working
>>solution. Looking now on the solution you came up with, I think it
>>interesting to see how different AS approaches can be!
>
>It's programming in general. As one of my co-workers is fond of saying "I
>wouldn't have done it like that, but..."
>
>cheshirekat: You need to make one change in your code. Add 31 to your
>list of days. Otherwise you'll never be able to add events to the 31st of
>any month that has 31 days.
>
>Wayne
>
>--
>No people is wholly civilized where a distinction is drawn between
>stealing an office and stealing a purse.
>- Theodore Roosevelt
>
>Live DAT & Music Page: http://homepage.mac.com/wayneb/
>Wayne's Music Calendar: http://ical.mac.com/wayneb/Music
>PowerMail AppleScript Archives: http://homepage.mac.com/wayneb/powermail.html
>
>Music Currently playing:
>
>
>