Hi guys
I'm trying to get contacts from a chatWnd using the Messenger.CurrentChats enumerator... but for some reason it doesn't work. If someone could take a look and maybe help here's the code.
code:
function SendsMyMessageToSomeone(Email,Message) {
var Windows = Messenger.CurrentChats;
var e = new Enumerator(Windows);
for(; !e.atEnd(); e.moveNext()) {
var myContacts = e.Contacts;
var f = new Enumerator(myContacts);
for(; !f.atEnd(); f.moveNext()) {
var myContact = f.item();
if(myContact.Email == Email) {
e.SendMessage(Message);
}
}
}
}
This is the error I get:
Error: Object not a collection.
Line: 26. Code: -2146827837.
Line 26 is: var f = new Enumerator(myContacts);
Thanks
edit: Solved by Plan. Thanks a lot.