I'm trying to make a script that closes the conversation-window when a contact signs out.
The code I have now:
code:
function OnEvent_ContactSignout(Email){
var contact=Messenger.MyContacts.GetContact(Email);
var chats = Messenger.CurrentChats;
var e = new Enumerator(contacts);
for(; !e.atEnd(); e.moveNext()){
var chat = e.item();
var contact1=chat.Contacts
if(contact==contact1){
chat.Close();
}
}
}
But, this doesn't work. What is wrong in this script, or what script can I use to close the conversation window of the person that signs out?