*This message was transferred with a trial version of CommuniGate(tm) Pro*
Marlyse,
I've got plenty of those books as well. Unfortunately never enough time
to really get into them.
I've taken the script you sent as the solution and changed it to include
my suggestions. I tested it and it seems to work. All you have to do is
call it with the message selected. Obviously it has to be a sent message.
If that's what you want enjoy. ;-)
Andy
<AppleScript>
on run
global theName, theEmail
scheduleCall()
end run
on scheduleCall()
tell application "PowerMail 5.0b12"
activate --not really necessary as you're already in PM
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 --(the
clipboard)
set url of theItem to theEmail --the clipboard
activate theItem
show theItem
end tell
end scheduleCall
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>
--
Andy Fragen
On Wed, Apr 28, 2004, Marlyse Comte said:
>
>thanks andy, this helps clarifying.
>
>>Keep asking specific questions.
>
>LOL. most of the time I unfortunately haven't a clue what to ask.
>
>around '96 I bought a VERY thick AppleScript book, I think it was the AS
>bible, at the same time I needed to study another but even thicker book
>which was the Director bible book - I worked my way through the Director
>book, but never got further than the first chapter of the AS book. It's
>actually really a pity, because I am aware of how helpful this language
>is, but nowadays it's the various web languages which take most of my
>attention and AS again has a back seat, even though I still have that old
>thick, red AS book (think I was on OS 7 at the time).
>
>thanks for your help!
>---marlyse
>
>