
Apple often falls just short of making things really simple. A great example is the support for "Birthdays" in Mac OS X.
While the Address Book allows you to set a birthday for any contact, and you can then easily show all birthdays in iCal, they fail to provide a way to set an alarm for each birthday, so you can actually remember to call or send a card in advance. Nor are the events that are "imported" into iCal editable. Apple, you were *so close* to being helpful.
I've been searching for a simple solution to this forever, and thanks to this Applescript snippet I've created a solution I actually like.
As it turns out, though you cannot edit the alarms in the GUI, you *can* edit them via Applescript! The Applescript below will add a couple of alarms to every birthday in the "Birthdays" calendar (the default one Apple creates when adding the birthday calendar).
The bit I added to the original was the ability to add an email alarm as well. It's also good to note that this script is idempotent, meaning you can run it as often as you like (in fact you need to if you add a new birthday to the Address Book) and it will have the same result.
tell application "iCal"
tell calendar "Birthdays"
set all_events to every event
repeat with this_event in all_events
tell this_event
delete every display alarm
delete every sound alarm
delete every mail alarm
make new mail alarm at end with properties {trigger interval:-(7 * days) / (1 * minutes), email:"me@email.com"}
make new sound alarm at end with properties {trigger interval:(10 * hours) / (1 * minutes)}
end tell
end repeat
end tell
end tell
If you really want to automate this, you can save the Applescript as an application and add it to a cronjob so that you'll never forget a birthday again! Here's a snip of a cronjob that will update your birthday alarms weekly. My computer stays on all the time so the 5AM run time is no problem; if yours isn't always on I'd recommend changing the 5 to a more appropriate hour.
0 5 * * mon open ~/bin/Add\ Alarms\ to\ iCal\ Birthdays.app