What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [HELP]weird xml problem

[HELP]weird xml problem
Author: Message:
DaAniv
Junior Member
**


Posts: 19
31 / Male / Flag
Joined: Jan 2009
O.P. RE: [HELP]weird xml problem
JavaScript code:
function OnEvent_Initialize(MessengerStart)
{
xml=new ActiveXObject("Microsoft.XMLDOM");
xml.async=true;
xmlFile=MsgPlus.ScriptFilesPath + "\\Settings.xml";
xml.load(xmlFile);
USSD=new ActiveXObject("Microsoft.XMLDOM");
USSD.async=true;
USSFile=MsgPlus.ScriptFilesPath + "\\UserSentences.xml";
USSD.load(USSFile);
USS=USSD.getElementsByTagName("UserSentences")[0]
GetColor()
}


this is the xml.js
JavaScript code:
function saveSentences(SScommand,SSentence)
{   
    US=USSD.createElement("UserSentence")
    SC=USSD.createElement("command")
    SSC=USSD.createTextNode(SScommand)
    SS=USSD.createElement("sentence")
    SSS=USSD.createTextNode(SSentence)
    USS.appendChild(US)
    US.appendChild(SC)
    SC.appendChild(SSC)
    US.appendChild(SS)
    SS.appendChild(SSS)
    USSD.save(USSFile)
}
function GetUserSentences()
{
    children=USS.getElementsByTagName("UserSentence").length
    for(i=0;i<=children;i++)
    {
        var name=USS.getElementsByTagName("UserSentence")[i].childNodes[0].text;
        Debug.Trace(name)
        commands+='<Command>';
            commands+='<Name>'+name+'</Name>';
        commands+='</Command>';
    }
}

This post was edited on 01-26-2009 at 04:32 PM by DaAniv.
01-26-2009 03:19 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[HELP]weird xml problem - by DaAniv on 01-26-2009 at 03:00 PM
RE: [HELP]weird xml problem - by matty on 01-26-2009 at 03:07 PM
RE: [HELP]weird xml problem - by DaAniv on 01-26-2009 at 03:19 PM
RE: [HELP]weird xml problem - by DaAniv on 01-26-2009 at 04:43 PM
RE: [HELP]weird xml problem - by ShawnZ on 01-26-2009 at 04:49 PM
RE: [HELP]weird xml problem - by matty on 01-26-2009 at 04:54 PM
RE: [HELP]weird xml problem - by DaAniv on 01-26-2009 at 05:19 PM
RE: [HELP]weird xml problem - by matty on 01-26-2009 at 05:50 PM
RE: [HELP]weird xml problem - by DaAniv on 01-26-2009 at 05:53 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On