What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Help] Enumerating XML nodes...

[Help] Enumerating XML nodes...
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Help] Enumerating XML nodes...
This is code from Screenshot Sender to enumerate controls it could be altered to do what you would need it to do:

js code:
/*
    Name:     EnumControls
    Purpose:    Enum the controls from a specified window
    Parameters: File - The name of the file
             pPlusWnd - The Plus! window object
    Return:     None
*/
function EnumControls ( File , pPlusWnd ) {
    _debug.getfuncname ( arguments ) ;
    // Load the XML from the specified file
    var XML = new ActiveXObject ( 'MSXML.DOMDocument' ) ;
    XML.load ( File ) ;
    // Loop through all of the controls
    var Controls = XML.selectNodes ( '/Interfaces/Window [ @Id='' + pPlusWnd.WindowId + '' ] /Controls/Control' ) ;
    for ( i=0 ; i<Controls.length ; i ++) {
        var Id = Controls [ i ].getAttribute ( 'Id' ) ;
        var Type = Controls [ i ].getAttribute ( 'xsi:type' ) ;
        // Get the value depending on the control's type
        objControls [ Id ] = {} ;
        objControls [ Id ].XsiType = Type ;
        objControls [ Id ].Value = pPlusWnd_GetControlvalue ( pPlusWnd , Id , Type ) ;
    }
}
11-16-2009 07:27 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Help] Enumerating XML nodes... - by whiz on 11-16-2009 at 07:14 PM
RE: [Help] Enumerating XML nodes... - by matty on 11-16-2009 at 07:27 PM
RE: [Help] Enumerating XML nodes... - by whiz on 11-16-2009 at 07:36 PM
RE: [Help] Enumerating XML nodes... - by Matti on 11-17-2009 at 06:42 PM
RE: [Help] Enumerating XML nodes... - by matty on 11-17-2009 at 07:08 PM
RE: [Help] Enumerating XML nodes... - by whiz on 11-18-2009 at 03:22 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