well you need to set up an Enumerator and iterate through the contact objects
code:
function OnEvent_ChatWndCreated(ChatWnd){
for(var e = new Enumerator(ChatWnd.Contacts);!e.atEnd();e.moveNext()){
Debug.Trace(e.item().Name);
}
}
that will list all the names of the contacts in the conversation window (prints to the debugging window btw)
edit: if you look in the Scripting Documentation there is an example that is similar to this, except it lists the emails of the whole contact list. (uses same method)