What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » HELP : Need a solution to load messages to jscript.

HELP : Need a solution to load messages to jscript.
Author: Message:
Saki
New Member
*


Posts: 6
Joined: Apr 2009
O.P. RE: HELP : Need a solution to load messages to jscript.
Dear everyone

This problems are still on.  :(

I try (some tips from http://shoutbox.menthix.net/showthread.php?tid=56747&page=1)

    code :
    var msgFile    = MsgPlus.ScriptFilesPath+"\\Messages.xml";
    function file_exists(file)
    {
       return new ActiveXObject("Scripting.FileSystemObject").FileExists(file);
    }
    -----------------------------------------------------------------------------------

and

    code :
    -----------------------------------------------------------------------------------
    function get_file_contents(file)
    {
        var fileSys = new ActiveXObject("Scripting.FileSystemObject");
        var fileH = fileSys.OpenTextFile(file, 1, 0);
        var text = fileH.ReadAll();
        fileH.close();
        return text;
    }
    -----------------------------------------------------------------------------------

Both function is work fine to load plain text file, but not work to parse XML file. If I change to prepare messages in text file, I still have problems in parser data. Because one message can be either one sentence or more sentences. That maybe a new problem to split messages to array.

Then I try (XML request) next one, even I don't know what are output should be.

// -------------------------------------------------------------------
// XML request
function NewRequest(service)
{
    xmlFile = service;
    Debug.Trace("Calling: "+xmlFile);
    var xml = new ActiveXObject("MSXML2.DOMDocument.4.0");
    xml.validateOnParse = false;
    xml.async = false;
    xml.load(xmlFile);
    var resp = xml.documentElement;
   
    return resp;
}
// -------------------------------------------------------------------

But I found an error. They say cannot to create obj from
var xml = new ActiveXObject("MSXML2.DOMDocument.4.0");

Because I am very new in XML, I not sure about XML structure.
I don't know how to parse information out.

Please help me! please give me some basic samples will be very kindness.

Thanks
04-30-2009 09:49 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
HELP : Need a solution to load messages to jscript. - by Saki on 04-30-2009 at 06:53 AM
RE: HELP : Need a solution to load messages to jscript. - by Saki on 04-30-2009 at 09:49 AM
RE: HELP : Need a solution to load messages to jscript. - by Spunky on 04-30-2009 at 12:04 PM
RE: HELP : Need a solution to load messages to jscript. - by Saki on 04-30-2009 at 02:50 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