quote:
Originally posted by Matty
code:
for(var enumerator = new Enumerator(pChatWnd.Contacts) ; !enumerator.atEnd(); enumerator.moveNext()){
var Contact = enumerator.item();
Debug.Trace('Contact.Email :'+Contact.Email);
}
Your going to have to change pChatWnd to whatever the ChatWnd object is called in the function.
Wouldn't the following code be better?
code:
for(var enumerator = new Enumerator(pChatWnd.Contacts) ; !enumerator.atEnd(); enumerator.moveNext()){
var Cont = enumerator.item();
if (Cont.Name === Origin){
var Contact = Cont;
}
}
Debug.Trace('The email of "+Origin+" is "+Contact.Email)//and you can use Contact throughout the rest of the function too