Shoutbox

Open And Write XML Files - 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: Open And Write XML Files (/showthread.php?tid=89904)

Open And Write XML Files by happy.evan on 03-26-2009 at 08:53 PM

Hi, i'm new in Messenger Plus scripting and im trying to do a script and for that i have to open, show and write a xml file.

I have a config. files window and i wanna to put a form there to insert into a xml file one phrase who is write into the form window.

And i wanna to open the xml and put in this form all phrases is in there.

In the xml "items" file i have this:

code:
    <Control xsi:type="ComboBoxControl" Id="cmbItems">
        <Position Top="60" Width="160" Left="5"/>
<Items>
                <Item Id="0">Frase 1</Item>
                <Item Id="1">Frase 1</Item>
                <Item Id="2">Frase 1</Item>
                <Item Id="3">Frase 1</Item>
                <Item Id="4">Frase 1</Item>
</Items>
    </Control>

Everything i done is the buttons script:
code:
//action for buttons
function OnWndConfigEvent_CtrlClicked(Wnd, ControlId)
{
    //close window
    if(ControlId == "BtnClose"){
        Wnd.Close(1);
        }
    //save
    else if(ControlId == "BtnSave"){
        Wnd.Close(2);
        }
    //add new phrase
    else if(ControlId == "BtnNovaFrase"){
        Wnd.Close(2);
    }
}