What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Help with small XML reader

Help with small XML reader
Author: Message:
chrisctx
New Member
*


Posts: 4
Joined: May 2010
O.P. RE: Help with small XML reader
Tried everything suggested, the script seems to just ignore my function calls =/


Here is my entire code:

Javascript code:
 
function OnEvent_Initialize(MessengerStart)
{
}
 
function OnEvent_Uninitialize(MessengerExit)
{
}
 
function OnEvent_MenuClicked (MenuItemId, Location, OriginWnd)
{
    // Captures when the user clicks on the 'WLMBb' menu
    if (MenuItemId=="Manage") fillTable();
}
 
function CreateXML() {
    try {
        var xml = new ActiveXObject("Microsoft.XMLDOM");
    } catch(e) { try {
        var xml = new ActiveXObject("MSXML2.DOMDocument");
    } catch(e) { return; } }
    xml.async = false;
    return xml;
}
 
function onManageEvent_CtrlClicked (PlusWnd, ControlId)
{
    if (ControlId == "Refresh")
    {
        fillTable();   
    }  
}
 
function fillTable()
{
    // Opens the window and loads the tasks from the XML file.
    var Manage = MsgPlus.CreateWnd("Interface.xml", "Manage");
 
    var XML = CreateXML();
        XML.load('tasks.xml');
    var Tasks = XML.selectNodes('/Tasks/Task');
    IntTaskList = Tasks.lenght
    IntId = 0;
    for (i=1; i<Tasks.length; i ++)
    {
       
        var TaskNode = Tasks[i];
        var NameNode = TaskNode.selectSingleNode("Name");
        var ExpiNode = TaskNode.selectSingleNode("Expiration");
        var CrseNode = TaskNode.selectSingleNode("Course");
        Manage.LstView_AddItem("ListViewName", NameNode.text, IntId++);
        Manage.LstView_AddItem("ListViewExpiration", ExpiNode.text, IntId++);
        Manage.LstView_AddItem("ListViewCourse", CrseNode.text, IntId++);  
    }
}



And this is all the output that the debug window displays

code:
Script is starting
Script is now loaded and ready
Function called: OnEvent_Initialize
Function called: OnEvent_MenuClicked
Function called: OnManageEvent_CtrlClicked


I appreciate the help tremendously, and I now love you to death for introducing me to XPath, that thing is brilliant :D
05-26-2010 01:10 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Help with small XML reader - by chrisctx on 05-25-2010 at 05:36 AM
RE: Help with small XML reader - by matty on 05-25-2010 at 11:35 AM
RE: Help with small XML reader - by chrisctx on 05-25-2010 at 03:39 PM
RE: Help with small XML reader - by Matti on 05-25-2010 at 04:03 PM
RE: Help with small XML reader - by chrisctx on 05-25-2010 at 06:07 PM
RE: Help with small XML reader - by Matti on 05-25-2010 at 06:25 PM
RE: Help with small XML reader - by chrisctx on 05-26-2010 at 01:10 AM
RE: Help with small XML reader - by Matti on 05-26-2010 at 11:31 AM


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