ok guys thank for your help
this is my final test code that works
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind){
if(Origin != Messenger.MyName){
for(var e = new Enumerator(ChatWnd.Contacts);!e.atEnd();e.moveNext()){
var Contact = e.item();
if(Contact.Email == "E-mail1@1.com"){
var newChatWnd = Messenger.OpenChat("E-mail2@2.com");
newChatWnd.SendMessage(Message);
}
}
}
}
now i modified it to say this
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin,Message,MessageKind){
if(Origin != Messenger.MyName){
for(var e = new Enumerator(ChatWnd.Contacts);!e.atEnd();e.moveNext()){
var Contact = e.item();
if(Contact.Email == "E-mail1@1.com"){
var newChatWnd = Messenger.OpenChat("E-mail2@2.com");
newChatWnd.SendMessage("Email 1 says:", Message);
}
}
}
}
it now doesnt produce the message and i wondered if anyone knows the issue