property before_title : "Birthday of " -- appended before the person's name in the event title property after_title : "" -- appended after the person's name in the event title property set_alarm : true -- true => alarm, false => no alarm property days_before : 4 -- number of days before the event that the alarm should start (ignored if set_alarm is false) property sound_name : "Basso" -- the name of the sound used for the alarm (ignored if set_alarm is false) property calendar_title : "Birthdays" -- the title of the calendar to which the events should be added tell application "Address Book" repeat with p in every person if birth date of p exists then set d to birth date of p set n to before_title & name of p & after_title tell application "iCal" set c to (the first calendar whose title is calendar_title) delete (every event of c whose summary is n and allday event is true) -- delete older events if any set e to (make new event with properties {summary:n, allday event:true, start date:d, recurrence:"FREQ=YEARLY;INTERVAL=1;BYMONTH=" & (month of d as integer)} at end of c) -- create all-day event repeated yearly if set_alarm then make new sound alarm with properties {sound name:sound_name, trigger interval:(days_before * -1440)} at beginning of e -- add alarm some days before end if end tell end if end repeat end tell