Hi John,
Thanks so much for your help with this problem. I am trying to remove alerts for a couple of specific shared calendars (which I can edit) but am having some difficulty due to my inexperience with applescript! I am also not sure where else to go for help solving this problem.
My plan is to run your script a couple of times specifying one calendar at a time by name.
This is the modification I made to your script:
tell application "Calendar"
activate
delay 0.5
display alert "Removing all alarms from your editable calendars" message "This process may take some time and is permanent. Are you sure you want to do this?" buttons {"Yes", "No"} cancel button 2
set calname to "Consultant_on_call"
--- repeat with myCalendar in (calendars whose writable is true)
repeat with myCalendar in (calendars whose name is calname)
repeat with myEvent in events of myCalendar
deletedisplay alarms of myEvent
deletemail alarms of myEvent
deletesound alarms of myEvent
deleteopen file alarms of myEvent
end repeat
end repeat
display alert "Removing all alarms from your editable calendars" message "This process is complete." buttons {"OK"} default button 1
end tell
Are you able to tell me what I am doing wrong? Thanks again.
Andrew