AnsweredAssumed Answered

Change script to work with Reminders in Mountain Lion

Question asked by msesmer on Apr 5, 2013
Latest reply on Apr 5, 2013 by philmodjunk

Title

Change script to work with Reminders in Mountain Lion

Post

     Im not very good at writing or modifying script. I had this script that worked to add a reminder from my FMP12 file and send it to tasks in iCal. After I updated to moutain lion the script stopped working because Reminders is a seperate app now. Does anyone know how to modify the following script to send to Reminders instead of iCal tasks?

      

     Via Jonathan Stark:
      
     -- grab the data from Filemaker
     tell application "FileMaker Pro Advanced"
     tell current record
     set theCalendar to cellValue of cell "Calendar"
     set thePerson to cellValue of cell "Person"
     set theDescription to cellValue of cell "Description"
     set theCallDate to cellValue of cell "Call Date"
     end tell
     end tell
      
     -- convert text to dates
     set theCallDate to date theCallDate
      
     -- create the ToDo in iCal
     tell application "iCal"
     -- make new calendar if need be
     set allCalendars to the title of every calendar
     if allCalendars contains theCalendar then
     set theCalendarNumber to (first calendar whose title is theCalendar)
     else
     set theCalendarNumber to (make calendar at end of calendars with properties {title:theCalendar})
     end if
      
     -- set the ToDo properties
     tell calendar theCalendar
     activate
      
     -- make ToDo
     set theToDo to make todo at end
      
     -- set the ToDo properties
     tell theToDo
     set the priority to medium priority
     set the summary to "Please call " & thePerson
     set the description to theDescription
     set the due date to theCallDate
      
     -- send email alarm the day before to the logged in user
     make new mail alarm at end with properties {trigger interval:-1440}
     end tell
      
     -- get the unique identifier of the new ToDo
     set theUID to the uid of theToDo
      
     show theToDo
     end tell
     end tell
      
     -- send the ToDo UID to Filemaker, if the field is on the current layout
     tell application "FileMaker Pro Advanced"
     tell current record
     try
     set the cellValue of cell "iCal UID" to theUID
     end try
     end tell
     end tell
      

      

Outcomes