Shoutbox

[REQUEST] How to 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: [REQUEST] How to create a window (/showthread.php?tid=63908)

[REQUEST] How to create a window by PaulE on 07-24-2006 at 03:38 PM

Hi,

This is my first Thread here, so i hope you gyz can read this :P
I am form The Netherlands so i dont think all that shit like here is right English.. :P

Enough talked, lets come to the point.
I want to create a window like this:

[Image: windowrn4.png]

But i dont know how...

I want that when i do '/showconfig' i get a window like that.
And then i want to edit my config for my script in that window.

I hope this is possible, and can help me with this...

Greetings,
Paul


RE: [REQUEST] How to create a window by RaceProUK on 07-24-2006 at 04:01 PM

quote:
Originally posted by PaulE
Enough talked
You mean 'enough said' [Image: msn_tongue.gif] Other than that, your English is good.

With Plus! scripts, windows are written in a dialect of XML. It's fully documented in the scripting documentation.
RE: RE: [REQUEST] How to create a window by PaulE on 07-24-2006 at 04:02 PM

quote:
Originally posted by RaceProUK
quote:
Originally posted by PaulE
Enough talked
You mean 'enough said' [Image: msn_tongue.gif] Other than that, your English is good.

With Plus! scripts, windows are written in a dialect of XML. It's fully documented in the scripting documentation.


Hehe ;)

Yes, i saw that but that is not enough informatie for me to create a window like that only a window with Hello Wolrd! in it ;)
RE: [REQUEST] How to create a window by RaceProUK on 07-24-2006 at 04:06 PM

It is enough information: you just have to make 2+2=5 [Image: msn_wink.gif] Just start off by experimenting. Write something you think will create a dialog with a control or two, and see if it works. If it does, cool. If it doesn't, read the docs and see what you did wrong.

Before you know it, you'll be coding windows in your sleep [Image: msn_wink.gif]


RE: [REQUEST] How to create a window by matty on 07-24-2006 at 04:17 PM

quote:
Originally posted by RaceProUK
It is enough information: you just have to make 2+2=5 [Image: msn_wink.gif] Just start off by experimenting. Write something you think will create a dialog with a control or two, and see if it works. If it does, cool. If it doesn't, read the docs and see what you did wrong.

Before you know it, you'll be coding windows in your sleep [Image: msn_wink.gif]
You know it might be good to provide examples.

Matty's reply to Cannot CreateChildWnd
RE: RE: [REQUEST] How to create a window by PaulE on 07-24-2006 at 04:37 PM

Look i got this at now:

code:
var WndExample;
var WndChildExample;

    function OnGetScriptMenu(nLocation){
        var sMenu = "<ScriptMenu>";
        sMenu += "    <MenuEntry Id=\"mnuExample\">Example</MenuEntry>";
        sMenu += "</ScriptMenu>";
        return sMenu;
    }
   
    function OnEvent_MenuClicked(sMenuId, nLocation, ChatWnd){
        if(sMenuId == "mnuExample"){

                                  /*
                                    Open up header
                                  */

                                  WindowOpend [ 0 ] = MsgPlus.CreateWnd( 'gui.xmll', 'Header' );

                                  /*
                                    Open inside parent, child SideBar
                                  */

                                  WindowOpend [ 1 ] = MsgPlus.CreateChildWnd( WindowOpend [ 0 ], 'gui.xml', 'SideBar', 9, 94, true );

                                  /*
                                    Open inside parent, child Main
                                  */

                                  WindowOpend [ 2 ] = MsgPlus.CreateChildWnd( WindowOpend [ 0 ], 'gui.xml', 'Main', 180, 113, true );
                                 
                                  /*
                                    Open inside parent, child Main
                                  */
                                 
                                  WindowOpend [ 3 ] = MsgPlus.CreateChildWnd( WindowOpend [ 0 ], 'gui.xml', 'Footer', 0, 0, true );
        }
    }

It is a part of a Robot script..

This xml file is with it:
http://www.webso.nl/msn/gui.xml (Just look in the source:$)

When i want to open the Example file, nothing happens :$
RE: [REQUEST] How to create a window by matty on 07-24-2006 at 05:07 PM

Is your XML file saved as unicode?

quote:
Originally posted by PaulE

code:
    /*
        Open up header
    */

    WindowOpend [ 0 ] = MsgPlus.CreateWnd( 'gui.xmll', 'Header' );


should be only 1 letter l in the filename.
RE: RE: [REQUEST] How to create a window by PaulE on 07-24-2006 at 05:11 PM

quote:
Originally posted by Matty
Is your XML file saved as unicode?

quote:
Originally posted by PaulE

code:
    /*
        Open up header
    */

    WindowOpend [ 0 ] = MsgPlus.CreateWnd( 'gui.xmll', 'Header' );


should be only 1 letter l in the filename.


Sorry read your post wrong ;)
RE: [REQUEST] How to create a window by matty on 07-24-2006 at 05:16 PM

quote:
Originally posted by PaulE
Sorry read your post wrong ;)

When you try and load your XML file you get this error

quote:
Originally posted by http://www.webso.nl/msn/gui.xml
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

Switch from current encoding to specified encoding not supported. Error processing resource 'http://www.webso.nl/msn/gui.xml'. Line 1, Position 40

<?xml version="1.0" encoding="UTF-16"?>

RE: RE: [REQUEST] How to create a window by PaulE on 07-24-2006 at 05:20 PM

quote:
Originally posted by Matty
quote:
Originally posted by PaulE
Sorry read your post wrong ;)

When you try and load your XML file you get this error

quote:
Originally posted by http://www.webso.nl/msn/gui.xml
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

Switch from current encoding to specified encoding not supported. Error processing resource 'http://www.webso.nl/msn/gui.xml'. Line 1, Position 40

<?xml version="1.0" encoding="UTF-16"?>



I changed the file name but still nothing happend...
Could you make al litte preview like the MSG Plus! Live configurator for me? :$ I dont think you have time for it.. But i you have i realy like you :D
RE: [REQUEST] How to create a window by RaceProUK on 07-24-2006 at 11:00 PM

You may have declared the encoding as UTF-16, but is your editor actually saving in that encoding?


RE: [REQUEST] How to create a window by PaulE on 07-25-2006 at 03:42 PM

If i have this:

code:
            </Control>
            <Control xsi:type="EditControl" Id="StupidTextBox">
                <Position Top="15" Left="10" Width="200"/>
                <Caption>test</Caption>

            </Control>


How can i disable is it?

And is hij have text in a var like this:

code:
var text = "Random code: + Math.Random();


how can i set it in that StupidTextbox? :P

So my questions are:
How can i disable StupidTextBox?
How can i set a var from a script in StupidTextBox?

Thnx, PaulE :banana:   :$