Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3756 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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"
 
 
Posted
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
  • Newbies
Posted

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!!!!

This topic is 3756 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.