creating calendar event with applescript not refreshing properly

I have been using applescript in file maker to create events in the Calendar app for quite sometime. When I upgraded to Yosemite The events are not showing up until I either quit and restart Calendar or if I manually create a new event in Calendar. Here is a sample applescript that recreates my problem consistently.


Tell application "Calendar"

activate

tell calendar "Home"

set theCurrentDate to current date

make new event at end with properties {description:"Event Decription", summary:"Event Name", location:Event Location", start date:theCurrentDate, end date:theCurrentDate +120 * Minutes}

end tell

reload calendars

end tell


When this script is run nothing seems to appear on the Calendar app but it immediately shows on my iPhone correctly. If I create a new event manually in the calendar the event created with the applescript will show up. Please help with this or fix the app so it refreshes properly.


Thank you

Mac mini, OS X Yosemite (10.10.1)

Posted on Nov 22, 2014 3:41 PM

Reply
1 reply

Mar 1, 2015 6:41 PM in response to jaamrode

There's a syntax error, you're just missing a " before Event Location in line 5.


Try this:

Tell application "Calendar"

activate

tell calendar "Home"

set theCurrentDate to current date

make new event at end with properties {description:"Event Decription", summary:"Event Name", location:"Event Location", start date:theCurrentDate, end date:theCurrentDate +120 * Minutes}

end tell

reload calendars

end tell

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

creating calendar event with applescript not refreshing properly

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.