quote:
Originally posted by SpunkyLoveMuff
Does chat.Contacts return the email or name of the contact, couldn't tell by quickly glancing at the documentation... It could just that.
Also, it may possibly be that "chat.Close()" should be "chat.Close(0)", as I think it MUST have an exit code.
chat.Contacts returns an enumeration of all contacts active in the chat window. So it returns an object of the type contact.
The use of an exit-code didn't have the right effect, it still doesn't work.
Edit:
I already found an error in this script:
code:
function OnEvent_ContactSignout(Email){
var contact=Messenger.MyContacts.GetContact(Email);
var chats = Messenger.CurrentChats;
var e = new Enumerator(chats);
for(; !e.atEnd(); e.moveNext()){
var chat = e.item();
var contact1=chat.Contacts
if(contact==contact1){
chat.Close();
}
}
}
In the declaration of var e "contacts" must be "chats". The problem isn't solved by this change.