Shoutbox

why won't this work - 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: why won't this work (/showthread.php?tid=67949)

why won't this work by Jimbo on 11-01-2006 at 08:35 PM

why won't this work

code:
function OnEvent_ChatWndCreated()
}
ChatWndSendMessage ('hi')
{
{

I want it so that when a chat window is created it sends hi.
RE: why won't this work by NanaFreak on 11-01-2006 at 08:43 PM

try this you had you { } around the wrong ways

code:
function OnEvent_ChatWndCreated(ChatWnd){
  ChatWnd.SendMessage ('hi');
}


RE: why won't this work by matty on 11-01-2006 at 08:45 PM

Well firstly ChatWndSendMessage doesn't exist. Secondly your not defining ChatWnd at all.

code:
function OnEvent_ChatWndCreated(oChatWnd){
    oChatWnd.SendMessage('hi');
}

You know the Scripting Documentation works windows wonders right?
RE: why won't this work by Jimbo on 11-02-2006 at 07:49 AM

Thanks both of you. works now