Shoutbox

MsgPlus windows: problem with close button - 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: MsgPlus windows: problem with close button (/showthread.php?tid=95081)

MsgPlus windows: problem with close button by macgyver08 on 07-22-2010 at 05:38 AM

This is the code I made to make the Close buttons work:

code:
function OnWndTestEvent_CtrlClicked(Wnd, ControlId)
{
    if(ControlId == "BtnClose")
        Wnd.Close(1);
}


I've made 2 XML files, one for each window, and both are EXACTLY the same (for testing purposes). However, the script to Close the windows that pasted above only works for one of the windows.

Do you know why this might be?
RE: MsgPlus windows: problem with close button by Spunky on 07-22-2010 at 05:43 AM

Are both windows called WndTest? You'd need to make a new function if not :p


RE: RE: MsgPlus windows: problem with close button by macgyver08 on 07-22-2010 at 05:44 AM

quote:
Originally posted by Spunky
Are both windows called WndTest? You'd need to make a new function if not :p

No. Two files, 2 different window IDs. One is "WndTest" and the other "WndTest2".

Edit:
Oh, you said "if not". I apologize haha. Thanks for the help! And sorry for such a silly question.