"12/12/12 00:00:00"
set startDate to date result
set day of startDate to 23
set month of startDate to 4
set year of startDate to 2015
set calendarName to "Sans titre"
set theRecurrence to "FREQ=YEARLY;INTERVAL=1"
set theSummary to "the summary"
set theDescription to "the description of a new event"
set alertDate to startDate + 11 * hours
set theScript to "/Users/yvankoenig/Library/Scripts/fake.scpt" # a script really existing on the HD
tell application "Calendar"
tell (first calendar whose name is calendarName)
set theEvent to make new event at end of events with properties {allday event:true, recurrence:theRecurrence, start date:startDate, description:theDescription, summary:theSummary}
tell theEvent
make new open file alarm at end with properties {trigger date:alertDate, filepath:theScript}
end tell
end tell
end tell
It seems to work but as I am curious, I tried to check what is really created with this other script :
tell application "Calendar"
tell (first calendar whose name is "Sans titre")
repeat with anEvent in every event
tell anEvent
its open file alarms
properties of item 1 of result
end tell
end repeat
end tell
end tell
{trigger interval:0, class:open file alarm, filepath:"", trigger date:date "mercredi 23 avril 2015 11:00:00"}