how to change participation status of attendee in ical meeting?

hello,

I have created a meeting on ical and attendee accepted the meeting, then organizer changes duration of meeting, manually doing that changes participation status of attendee to unknown, but when i have tried it using apple script, won’t work. Then i have tried to change it using attendees participation status as mentioned in ical dictionary, but it didn’t work…

can any body tell me what is the problem with below script or any other way to do that…

tell application "iCal"
	tell calendar "NewCal"
		--try
		set Event_Edited to event 1
		set end date of event 1 to (end date of event 1) + 1 * minutes
		set event_recipients to attendees of event 1
		--return participation status of item 2 of attendees of event 1 as string
		repeat with i from 1 to count of event_recipients by 1
			
			if display name of item i of event_recipients is not equal to "organizer" then
				set participation status of item i of attendees of event 1 to Unknown 
                                                display dialog participation status of item i of attendees of event 1 as string
				
				--return participation status of item i of attendees of event 1
			end if
		--display dialog display name of item i of event_recipients
		end repeat
	end tell
end tell

regards,
anil

Long time went by but may be it will be useful for others.

While I appreciate the Shane’s CalendarLib library, I am having hard time grasping it and even more to integrate it with applescritping calendar events.

So I made my “create event” applescript, with all the event properties I could find that can be modified on creation.

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

--make a new event
set theAttendee to {"Trevisan", "Rossi", "Cozzi"}
set theAttendeeStatus to {"accepted", "DECLINED", "unknown"}

tell application "Calendar"
	tell calendar "MyCal1"
		set ThedataInizio to current date
		set ThedataFine to (current date) + 2 * hours
		set theLocation to "Roma"
		set theURL to "trevix ha fame"
		set theAllDay to "true"
		set theFreq to ""
		--set theFreq to "FREQ=DAILY;INTERVAL=1" --repeat every day
		set newEvent to make new event at end with properties ({description:"DettaglioTcal", summary:"DescrizioneTcal", location:theLocation, start date:ThedataInizio, end date:ThedataFine, url:theURL, allday event:theAllDay, recurrence:theFreq}) without runs
		
		
		repeat with i from 1 to the number of items of theAttendee
			if item i of theAttendeeStatus = "accepted" then
				tell newEvent to set theNewAttendee to make new attendee at the beginning of attendees with properties {display name:(item i of theAttendee), participation status:accepted}
			end if
			if item i of theAttendeeStatus = "unknown" then
				tell newEvent to set theNewAttendee to make new attendee at the beginning of attendees with properties {display name:(item i of theAttendee), participation status:unknown}
			end if
			if item i of theAttendeeStatus = "TENTATIVE" then
				tell newEvent to set theNewAttendee to make new attendee at the beginning of attendees with properties {display name:(item i of theAttendee), participation status:tentative}
			end if
			if item i of theAttendeeStatus = "DECLINED" then
				tell newEvent to set theNewAttendee to make new attendee at the beginning of attendees with properties {display name:(item i of theAttendee), participation status:declined}
			end if
		end repeat
		
		--set stamp date of newEvent to date_stamp
		set theEventProperties to properties of newEvent
		set theAttendProperties to properties of theNewAttendee
		return theAttendProperties
	end tell
end tell

As you can see, I could not find another way for the participation status to get accepted then use a redundant if…then series.
I would appreciate some help with it.
Also I would like to know if there are other event properties that are scriptable ( a nice list of props do and don’t on this website would be appreciated).

Trevis