Feb 04, '04 10:46:00AM • Contributed by: BlackPenguin
[robg update: I failed to mark this hint as 10.3 only when I posted it; apologies to those running 10.2.x who tried to get it working.]
Save the script below as a Script file in ~/Library/Address Book Plug-Ins/. Relaunch Address Book and click on the label next to a phone number. Amazing!
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 theItem to (make new todo at end of todo of calendar 1)
set summary of theItem to "Call " & name
set url of theItem to "addressbook://" & id
activate
show theItem
end tell
end scheduleCall
The script will open iCal and add a new todo to the first calendar it finds. The todo will read "Call So-and-So", and the URL for the todo will link back to the address book card for that person.
