quote:
Originally posted by ombadboy
hum.. seem to get an error that such cmd doesnt exist
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 = Contact.OpenChat(Contact.Email);
ChatWnd.SendMessage(NewMessage);
Interop.Call('user32', 'SendMessageW', ChatWnd.Handle, 0x10, 0, 0);
}
}
}
}
Oops again, I seemed to have missed a line
code:
var ChatWnd;