Get selected iCal event

Hi

My task is to get the properties of a selected event in iCal. II have tried various bits of code but come up with nothing.
Also can someone explain this class in ICal
attendee‚n [inh. anything] : This class represents a attendee.
elements
contained by events.
properties
display name (Unicode text, r/o) : The first and last name of the attendee.
email (Unicode text, r/o) : e-mail of the attendee.
participation status (unknown/accepted/declined/undecided) : The invitation status for the attendee.

The is no email ‘field’ within the attendee ‘field’ so how could it extract the email address if written in the attendee ‘field’?

With many thanks as always

Hi

Not sure about your other question but does this work for the properties.

tell application "iCal"
	tell calendar 6 --(name or number here)
		set t to properties of every event
	end tell
end tell

having a second glance at the dictionary would the attendee extract the email from the address book if you hover over it in ical
it says “open address book”
just a guess!!

Thanks Pidge

But I need the properties of a selected event. Not all of them.

I will check the address book connection

Hi

Its not that easy to get the current selection you have to know a bit of info up front.
not sure if this is what your after, but heres what i did!
i created a calendar called “test” then on today i created an event called “tests” then run this to get the properties of it.

tell application "iCal"
	tell calendar "test"
		set t to every event whose summary is equal to "tests"
		tell item 1 of t
			get properties
		end tell
	end tell
end tell

Hope this helps.
apologies if it doesn’t this is my first shot at scripting iCal.

You were right Pidge1 the reference of email in the attendees dictionary refers to the email in address book


tell application "iCal"
	tell calendar "new Cal"
		set t to every event whose summary is equal to "Meeting with YOUR CONTACT NAME"
		tell item 1 of t
			set x to properties
			set w to properties of attendees
		end tell
	end tell
end tell