Rick -
> I use iCal via Powermail, which is a patcher that rejigs something
> inside iCal. Now, all my reminder emails are sent by PM. If you want
> to revert to using Mail for iCal alarms, you have to reinstall iCal,
> but why would anyone want to revert to using Mail?
>
> It's at:
> <http://www.versiontracker.com/dyn/moreinfo/macosx/21197>
Email reminders patched flow: from iCal to PM.
I am going for the other flow: from PM to iCal.
Specifically the sequence would go like this:
Email arrives in PM with demand to write an email within so-and-so-many-
days. Select the FROM or REPLY-TO address, activate AppleScript within PM
to copy the selected address and to CREATE A TODO in iCAL with the
selected address.
I am sure I can use the second part of my Address Book to iCal script
(which even allows me to select a specific Calendar), but I do not know
how to get the first part, the first 16 lines, right.
---marlyse
Following again the script I have but need help to modify to achieve what
I stated above:
------------ existing AS: -------------
using terms from application "Address Book"
on action property
return "phone"
end action property
on action title for p with e
set theName to (first name of p) & " " & (last name of p)
return "Schedule call to " & theName
end action title
on should enable action for p with e
return true
end should enable action
on perform action for p with e
set theName to (first name of p) & " " & (last name of p)
scheduleCall((id of p), theName)
end perform action
end using terms from
on scheduleCall(id, name)
tell application "iCal"
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 "Call " & name
set url of theItem to "addressbook://" & id
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