Shoutbox

Can't Create a Window - 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: Can't Create a Window (/showthread.php?tid=77505)

Can't Create a Window by a0369 on 09-15-2007 at 02:20 PM

I followed the manual and even Copy and Pasted the code and it still will not create a window. I don't know why, it just won't do it no matter what I do.

Script:

code:
function OnEvent_Initialize(MessengerStart)
{
    var Wnd = MsgPlus.CreateWnd("InterfaceTest.xml", "WndTest");
}

function OnEvent_Uninitialize(MessengerExit)
{

}


Here's the XML file and yes it's the correct filename

code:
<Interfaces xmlns="urn:msgplus:interface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi: schemaLocation="urn:msgplus:interface PlusInterface.xsd">
    <Window Id="WndTest" Version="1">
        <Attributes>
            <Caption>Test Window</Caption>
        </Attributes>
        <TitleBar>
            <Title><Text>Hello!</Text></Title>
        </TitleBar>
        <Position Width="180" Height="75"/>
        <DialogTmpl/>
        <Controls>
            <Control xsi:type="StaticControl" Id="LblTop">
                <Position Left="10" Top="10" Width="150"/>
                <Caption>Hello world!</Caption>
            </Control>
            <Control xsi:type="ButtonControl" Id="BtnClose">
                <Position Left="112" Top="25" Width="50"/>
                <Caption>Close</Caption>
            </Control>
        </Controls>
    </Window>
</Interfaces>


I downloaded the manual for MsgPlus yesterday so it should be current. Also, other scripts can display windows, but none of mine will. It processes the script, but anything dealing with Windows will not work.
RE: Can't Create a Window by Flash on 09-15-2007 at 02:40 PM

What the programm u use for edit xml file?
(i think is a bad encoding format)


RE: Can't Create a Window by a0369 on 09-15-2007 at 02:41 PM

editplus


RE: Can't Create a Window by roflmao456 on 09-15-2007 at 02:42 PM

open in notepad and
save the file encoded as Unicode and then try again.


RE: Can't Create a Window by NanaFreak on 09-15-2007 at 02:47 PM

you need to save as unicode 16 (sometimes its called UCS-2 Little Endian)


RE: Can't Create a Window by a0369 on 09-15-2007 at 02:49 PM

ok i did that now it comes up, thanks for the help