Shoutbox

is this a logical or syntax? - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: is this a logical or syntax? (/showthread.php?tid=87969)

is this a logical or syntax? by jollyscripts on 12-26-2008 at 07:09 PM

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
RE: is this a logical or syntax? by Mnjul on 12-26-2008 at 07:30 PM

quote:
Originally posted by jollyscripts
newChatWnd.SendMessage("Email 1 says:", Message);
Use
jscript code:
newChatWnd.SendMessage("Email 1 says: " + Message);

Edith: thx matty, corrected.
RE: is this a logical or syntax? by matty on 12-26-2008 at 09:11 PM

quote:
Originally posted by Mnjul
Msesage
Message

:P