Shouldn't this line
code:
ChatWnd = Contact.OpenChat(Contact.Email);
be
code:
ChatWnd = Messenger.OpenChat(Contact);
?
That is the only OpenChat function I can find in the documentation, Contact doesn't have one.
That would make the whole script
code:
function OnEvent_ChatWndSendMessage(pChatWnd, sMessage){
if (sMessage.substring(0, 6) == '/imall'){
var NewMessage = sMessage.substr(7);
var ChatWnd;
for(var enumerator = new Enumerator(Messenger.MyContacts) ; !enumerator.atEnd(); enumerator.moveNext()){
var Contact = enumerator.item();
if (Contact.Status != 1){
ChatWnd = Messenger.OpenChat(Contact);
ChatWnd.SendMessage(NewMessage);
Interop.Call('user32', 'SendMessageW', ChatWnd.Handle, 0x10, 0, 0);
return '';
}
}
}
}
It is a good script though, I was going to write something like this myself eventually, but now I don't have to!