Jump to content

Filemaker to iCal Applescript for Alarms


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

Recommended Posts

  • 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"
 
 
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 3519 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.