I fiddled around and it's crude but does the basics: copies the selection
in PM and creates a new iCal todo and allows you to select the calendar
and puts the selection into the summary (title) of the todo inclusive the
prefix 'email' and makes that active (i.e. lets you set the date and
priority).

there is one caveat: one has to open the message to be able to select the
address, i.e. reply or forward and then manually select the address
before activating the AS

I am sure it's full of AS blunders, but I do not know AS, just fiddled
around until I got what I wanted. one could smooth it out, have the email
text be pasted into the content section in ical and select the priorities
during the creation of the todo, but right now it's good enough for me -
maybe it works also for somebody else:

on run
        scheduleCall()
end run

on scheduleCall()
        
        tell application "PowerMail 5.0b12"
                activate
                try
                        copy selection
                        set clipboard to the selection
                end try
        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 " & " " & (the clipboard)
                set url of theItem to 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


Reply via email to