How to modify the attendess of an event in Calendar with Applescript?
I am trying to add/delete attendees from an event in Calendar.
In the following snippet I am trying to remove an attendee from an event if the email is user1@email.com
tell application "Calendar"
tell calendar "Work"
set evt to (first event where its uid = "XXXXXXX")
set attendee_list to the email of every attendee of evt as list
-- {"user1@email.com", "user2@gmail.com"}
repeat with i from 1 to the number of items of attendee_list
if item i of attendee_list = "user1@gmail.com" then
tell evt
set email to "" -- ?????????
end tell
end if
end repeat
end tell
end tell
What's the correct syntax here? Any help would be appreciated!