August 9, 201411 yr Newbies Hi All, I've been successful in creating an Applescript that creates events in iCal based on my fields in my 'shows 2' table in Filemaker. I was wondering if anybody knows how to add an alarm to the newly created event (ideally to notify the user the day before). Many thanks Here's the code in my Perform Applescript function (calculated): "tell application "Calendar" ¶ tell calendar "Test Cal" ¶ set eventDate to date " & Quote ( shows 2::typeDate ) & "¶ set eventDateEnd to date " & Quote ( shows 2::typeDateEnd ) & "¶ set newEvent to make new event at end with properties {description:" & Quote ( shows 2::icsDescription ) & ", summary:" & Quote ( shows 2::icsSummary ) & ", location:" & Quote ( shows 2::location ) & ", start date:eventDate, end date:eventDateEnd} ¶ end tell ¶ end tell"
August 9, 201411 yr Try adding these lines: … set alarmDate to date " & Quote ( shows 2::typeDate - 1 ) … tell newEvent make new display alarm at end with properties {trigger date:alarmDate} end tell …
August 10, 201411 yr Author Newbies Marvellous!! For calculating the date, I added an extra column in the table that automatically creates and formats the value. For some reason it has to be in the format: "DayName, Day Month Year HH:MM:SS". Top man - thank you!!!!
Create an account or sign in to comment