Hi !
i've a problem with my script...
code:
function OnEvent_ChatWndSendMessage(ChatWnd,Message)
{
if (Message.match(/^!massmsg$/))
{
MsgPlus.DisplayToast("Mass Message :: Usage","!massmsg <message>");
return "";
}
else if (Message.match(/^!massmsg .+/))
{
var strMessage = Message.substr(9);
Debug.trace(strMessage);
var Contacts = Messenger.MyContacts;
var e = new Enumerator(Contacts);
var Contact = e.item();
for(; !e.atEnd(); e.moveNext())
{
var Contact = e.item();
if (Contact.Status != 1)
{
var ChatWnd2 = Messenger.OpenChat(Contact.Email);
Debug.trace(strMessage);
ChatWnd2.SendMessage(strMessage);
}
}
return "";
}
}
The Error : Erreur : 'null' a la valeur Null ou n'est pas un objet..
~= 'null' egal Null or is not an object.
The line where is signaled the error : ChatWnd2.SendMessage(strMessage);
The both Debug.trace(strMessage) are Ok