Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mrjayviper

macrumors regular
Original poster
Jul 17, 2012
245
27
I have an Applescript here that triggers when an ICS file has been dropped into a folder. All it does it imports the ICS file into the Calendar and then create alarms for each calendar entry.

This was working fine on Mountain Lion. But hasn't been working since Mavericks/Yosemite. The macmini (bought late 2014) it's installed on can only use Yosemite. I cannot install anything else.

The calendar entries are being imported. But no alarms are being created.

This is code I use to add the alarm. I didn't include the code that imports the ICS file but that part is working.

Code:
tell application "Calendar"
	tell calendar "Home"
		delay 1
		set myevents to every event
		
		repeat with oneevent in myevents
			tell oneevent
				set mysummary to summary
				display dialog mysummary
								
				make new display alarm at end with properties {trigger interval:-30}
			end tell
		end repeat					
	end tell
end tell

As you can see from the code, I am displaying the summary for the event just as a test. I just want to find out it's opening the correct event.

I've looked/searched for examples/documentation on the topic but hardly find anything recent (i.e. Mavericks and above).

Any ideas on how to fix my problem? Thanks a lot
 
Any ideas on how to fix my problem? Thanks a lot

Please post the output of Events and Replies when you run the script.

Note : Screenshots of a quick test on Mavericks and Yosemite.
 

Attachments

  • Screen Shot 2015-01-09.png
    Screen Shot 2015-01-09.png
    197.5 KB · Views: 139
  • Screen Shot 2015-01-10.png
    Screen Shot 2015-01-10.png
    170.9 KB · Views: 157
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.