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.
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
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