-- -- Make Sync Birthdays.scpt -- -- A script to create a duplicate calendar based on -- iCal's "Birthdays" auto-calendar suitable for -- syncing with Symbian OS phones and iSync 2.0 -- -- Will Harris, will at harris dot ch -- property syncCal : "SyncBirthdays" set counter to 0 set counter1980 to 0 tell application "iCal" set bdays to every event of calendar "Birthdays" if not (calendar syncCal exists) then make new calendar with properties {name:syncCal} end if delete every event in calendar syncCal repeat with abday in bdays set counter to counter + 1 set evtProps to properties of abday set descr to description of evtProps set start to start date of evtProps set endd to end date of evtProps set recur to recurrence of evtProps set isallday to allday event of evtProps set summry to summary of evtProps if (year of start) < 1980 then set year of start to 1980 set year of endd to 1980 set counter1980 to counter1980 + 1 end if tell calendar syncCal set newEvent to make new event at end of events tell newEvent set start date to start set end date to endd set recurrence to recur set allday event to isallday set summary to summry end tell end tell end repeat display dialog "Processed " & counter & " birthdays (" & counter1980 & " set to 1980)" end tell