| |
| | |

Apple Phoon Forum

 Forgot password?
 Register
View: 647|Reply: 0

Change Apple Script for Filemaker to create reminders

[Copy link]

Post time: 2014-01-14 10:53:53 |Show all posts
AppleScript
I'm 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
Reply

Use magic Report

You have to log in before you can reply Login | Register

Archive| Apple Phoon

2021-04-18 06:51 GMT-8 , Processed in 0.079609 sec., 28 queries .

Powered by Discuz! 7.2

Release 20121101, © 2001-2021

To Top