Jump to content

Applescript: Trying to delete a Calendar event

1 post in this topic

Recommended Posts

Hi All, 


I would like to use apple script to delete callendar events whit a certain date. Been reading last of websites on how to do this, foudn and used several suggested syntax but I keep getting the error when I try to delete an event: "error "Calendar got an error: Can’t make \"7C573D4F-4BCD-4E94-A8FE-2E4FA30FAF14\" into type specifier." number -1700 from "7C573D4F-4BCD-4E94-A8FE-2E4FA30FAF14" to specifier


So this is what I got: I create a list which contains al the events on the given date. I extract the Uid of the first event and use the command delete to delete the event. But that's where I get the error. 


What am I doing wrong? 


Thanks for the help, 





tell application "Calendar"

  tell calendar "test"

    set datum to date "Saturday 10 October 2015 00:00:00"

    set theEventList to every event whose start date is equal to datum


    set theEvent to first item of theEventList

    set EventID to uid of theEvent

    delete EventID


  end tell

end tell

Link to comment
Share on other sites


  • Create New...