What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Interface Writer | [release] 3.0 | 22/08/2010

2 votes - 5 average   Interface Writer | [release] 3.0 | 22/08/2010
Author: Message:
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
RE: RE: Interface Writer | [release] 1.2
quote:
Originally posted by whiz

Ok, let's see.

js code:
var ControlsXPath = "//Interfaces/Window[@Id=\"" + WindowId + "\"]/Controls/Control";
var ElementsXPath = "//Interfaces/Window[@Id=\"" + WindowId + "\"]/Elements/Element";
/
ret.Interface[WindowId] = new Object();
ret.Interface[WindowId].Controls = new Object();
ret.Interface[WindowId].Elements = new Object();
1) Am I able to create my own, like this?  For example, to get the window title:
js code:
var CaptionsXPath = "//Interfaces/Window[@Id=\"" + WindowId + "\"]/Attributes/Caption";
var TitlesXPath = "//Interfaces/Window[@Id=\"" + WindowId + "\"]/TitleBar/Title/Text";
But...  it can't be enumerated:
js code:
var K = new Enumerator(xml.selectNodes(CaptionsXPath));
It's different, because the value isn't "<Item Parameter="Value">", but "<Item>Value</Item>".  How can I get that?

js code:
var K = new Enumerator(xml.selectNodes(ControlsXPath));
if(K.count() > 0) {
    for(; !K.atEnd(); K.moveNext()) {
        var ControlNode = K.item();
        var ControlId = ControlNode.getAttribute("Id");
        // Define an object for this control type (as in ButtonControl or StaticControl) that contains the actual control
        // Only done when necessary
        if(ControlId in ret.Interface[WindowId].Controls) {
            //[alert the user that there's 2 or more controls with the same ID]
            continue;
        }
        // You'll have to do your own stuff here
        ret.Interface[WindowId].Controls[ControlId] = "null" //[JScript control definition stuff]
    }
}
2a) If that gets a control ID, then I assume that getting the type uses the same method, replacing ".getAttribute("Id")" with ".getAttribute("xsi:type")", right?
2b) Would this work:
[code left out]

1) yes.
2) also yes, but instead of "ControlLeft" and "ControlId" variables, you may wanna use an object with these properties:

code:
var Control = new Object();
Control.Id = xmlNode.getAttribute("Id"); // xmlNode in this case is K.item();
Control.Type = xmlNode.getAttribute("xsi:type");
Control.Position = {
    "Left"    : xmlPosNode.getAttribute("Left"),
    "Top"    : xmlPosNode.getAttribute("Top"),
    "Width"    : xmlPosNode.getAttribute("Width"),
    "Height"    : xmlPosNode.getAttribute("Height") // Note that there's no comma on this one
}// Object definition, version 2

About the enumeration thingy: there's probably only one node, so enumeration would be useless with "var CaptionsXPath = "//Interfaces/Window[@Id=\"" + WindowId + "\"]/Caption";" and such. You can retrieve the caption using the following code:

JScript code:
var CaptionXPath = "//Interfaces/Window[@Id=\"" + WindowId + "\"]/Caption"
var node = xml.selectSingleNode(CaptionXPath);
var sCaption = node.text;

quote:
Originally posted by whiz
I apologise for so many questions, but this is a confusing topic for me...  :S

Never mind, I started with the same amount of questions :P

Oh and sorry for the late answer. Had no PC for over a week :S

This post was edited on 06-28-2009 at 07:20 AM by SmokingCookie.
06-28-2009 07:13 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Interface Writer | [release] 3.0 | 22/08/2010 - by whiz on 05-25-2009 at 02:55 PM
RE: BETA - Interface Writer 1.0! - by matty on 05-25-2009 at 03:16 PM
RE: BETA - Interface Writer 1.0! - by Spunky on 05-25-2009 at 03:26 PM
RE: Interface Writer | [beta] 1.0 - by whiz on 05-25-2009 at 03:31 PM
RE: BETA - Interface Writer 1.0! - by Matti on 05-25-2009 at 04:02 PM
RE: BETA - Interface Writer 1.0! - by Spunky on 05-25-2009 at 04:07 PM
RE: BETA - Interface Writer 1.0! - by Matti on 05-25-2009 at 04:11 PM
RE: Interface Writer | [beta] 1.0 - by whiz on 05-25-2009 at 05:15 PM
RE: BETA - Interface Writer 1.0! - by Matti on 05-25-2009 at 05:41 PM
RE: BETA - Interface Writer 1.0! - by vaccination on 05-25-2009 at 05:41 PM
RE: BETA - Interface Writer 1.0! - by CookieRevised on 05-25-2009 at 06:24 PM
RE: Interface Writer | [beta] 1.0 - by whiz on 05-27-2009 at 05:37 PM
RE: BETA - Interface Writer 1.0! - by roflmao456 on 05-27-2009 at 06:50 PM
RE: Interface Writer | [release] 1.2 - by whiz on 05-27-2009 at 07:02 PM
RE: BETA - Interface Writer 1.0! - by matty on 05-27-2009 at 07:05 PM
RE: Interface Writer | [release] 1.2 - by whiz on 05-27-2009 at 08:05 PM
RE: BETA - Interface Writer 1.0! - by vaccination on 05-27-2009 at 07:13 PM
RE: Interface Writer | [release] 1.2 - by whiz on 05-27-2009 at 07:45 PM
RE: BETA - Interface Writer 1.0! - by vaccination on 05-27-2009 at 09:28 PM
RE: Interface Writer | [release] 1.2 - by whiz on 05-28-2009 at 03:26 PM
RE: BETA - Interface Writer 1.0! - by vaccination on 05-28-2009 at 03:59 PM
RE: Interface Writer | [release] 1.2 - by whiz on 05-28-2009 at 04:01 PM
RE: BETA - Interface Writer 1.0! - by vaccination on 05-28-2009 at 04:07 PM
RE: Interface Writer | [release] 1.2 - by whiz on 05-28-2009 at 04:12 PM
RE: Interface Writer | [beta] 1.0 -> [release] 1.2 - by mynetx on 06-14-2009 at 03:58 PM
RE: Interface Writer | [release] 1.2 - by whiz on 06-14-2009 at 04:16 PM
RE: Interface Writer | [beta] 1.0 -> [release] 1.2 - by mynetx on 06-14-2009 at 04:56 PM
RE: Interface Writer | [beta] 1.0 -> [release] 1.2 - by SmokingCookie on 06-14-2009 at 05:34 PM
RE: Interface Writer | [beta] 1.0 -> [release] 1.2 - by vaccination on 06-14-2009 at 10:04 PM
RE: Interface Writer | [release] 1.2 - by whiz on 06-15-2009 at 03:16 PM
RE: Interface Writer | [beta] 1.0 -> [release] 1.2 - by SmokingCookie on 06-15-2009 at 04:30 PM
RE: Interface Writer | [release] 1.2 - by whiz on 06-15-2009 at 06:27 PM
RE: Interface Writer | [beta] 1.0 -> [release] 1.2 - by SmokingCookie on 06-15-2009 at 07:51 PM
RE: Interface Writer | [release] 1.2 - by whiz on 06-15-2009 at 08:03 PM
RE: Interface Writer | [beta] 1.0 -> [release] 1.2 - by SmokingCookie on 06-16-2009 at 12:17 PM
RE: Interface Writer | [beta] 1.0 -> [release] 1.2 - by Flippy on 06-17-2009 at 11:47 AM
RE: Interface Writer | [release] 1.2 - by whiz on 06-17-2009 at 06:56 PM
RE: RE: Interface Writer | [release] 1.2 - by SmokingCookie on 06-28-2009 at 07:13 AM
RE: Interface Writer | [beta] 1.0 -> [release] 1.5 - by CookieRevised on 06-22-2009 at 06:11 PM
RE: RE: Interface Writer | [beta] 1.0 -> [release] 1.5 - by whiz on 06-27-2009 at 02:57 PM
RE: Interface Writer | [beta] 1.0 -> [release] 1.5 - by CookieRevised on 06-28-2009 at 01:16 AM
RE: Interface Writer | [release] 1.5 - by whiz on 06-28-2009 at 09:30 AM
RE: Interface Writer | [release] 1.5 - by SmokingCookie on 06-28-2009 at 03:24 PM
RE: Interface Writer | [release] 1.5 - by whiz on 06-29-2009 at 06:31 PM
RE: Interface Writer | [release] 1.5 - by SmokingCookie on 06-29-2009 at 07:12 PM
RE: Interface Writer | [release] 1.5 - by mynetx on 06-30-2009 at 07:31 AM
RE: Interface Writer | [release] 2.0 | 07/11/2009 - by whiz on 11-07-2009 at 01:49 PM
RE: Interface Writer | [release] 2.0 | 07/11/2009 - by mynetx on 11-07-2009 at 02:04 PM
RE: Interface Writer | [release] 2.0 | 07/11/2009 - by whiz on 11-07-2009 at 02:32 PM
RE: RE: Interface Writer | [release] 2.0 | 07/11/2009 - by CookieRevised on 11-07-2009 at 05:43 PM
RE: Interface Writer | [release] 2.0 | 07/11/2009 - by mynetx on 11-07-2009 at 06:28 PM
RE: RE: Interface Writer | [release] 2.0 | 07/11/2009 - by CookieRevised on 11-07-2009 at 11:07 PM
RE: Interface Writer | [release] 2.0 | 07/11/2009 - by whiz on 11-08-2009 at 11:57 AM
RE: Interface Writer | [release] 2.0 | 07/11/2009 - by CookieRevised on 11-08-2009 at 05:56 PM
RE: Interface Writer | [release] 2.0 | 07/11/2009 - by whiz on 11-09-2009 at 06:52 PM
RE: Interface Writer | [release] 2.0 | 07/11/2009 - by CookieRevised on 11-10-2009 at 07:45 AM
RE: Interface Writer | [release] 2.0 | 07/11/2009 - by whiz on 11-10-2009 at 04:14 PM
RE: Interface Writer | [release] 2.2 | 29/11/2009 - by whiz on 11-29-2009 at 05:19 PM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by whiz on 01-30-2010 at 01:16 PM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by SmokingCookie on 01-30-2010 at 01:25 PM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by MeEtc on 01-31-2010 at 02:40 AM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by whiz on 01-31-2010 at 08:48 AM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by whiz on 01-31-2010 at 04:00 PM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by SmokingCookie on 01-31-2010 at 05:04 PM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by MeEtc on 02-01-2010 at 12:01 AM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by whiz on 02-02-2010 at 06:34 PM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by SmokingCookie on 02-10-2010 at 07:32 PM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by whiz on 02-11-2010 at 08:03 PM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by SmokingCookie on 02-12-2010 at 08:34 AM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by whiz on 02-12-2010 at 07:41 PM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by SmokingCookie on 02-13-2010 at 08:49 AM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by whiz on 02-14-2010 at 10:50 AM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by SmokingCookie on 02-14-2010 at 11:01 AM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by whiz on 02-14-2010 at 11:22 AM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by SmokingCookie on 02-14-2010 at 12:53 PM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by whiz on 02-14-2010 at 01:41 PM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by SmokingCookie on 02-14-2010 at 01:44 PM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by whiz on 02-14-2010 at 02:00 PM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by SmokingCookie on 02-14-2010 at 02:04 PM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by whiz on 02-14-2010 at 02:12 PM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by CookieRevised on 02-14-2010 at 04:32 PM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by whiz on 02-14-2010 at 06:32 PM
RE: RE: Interface Writer | [release] 2.5 | 30/01/2010 - by SmokingCookie on 02-14-2010 at 08:09 PM
RE: Interface Writer | [release] 2.5 | 30/01/2010 - by whiz on 02-16-2010 at 02:57 PM
RE: Interface Writer | [release] 2.7 | 16/02/2010 - by billyy on 02-16-2010 at 04:20 PM
RE: Interface Writer | [release] 2.7 | 16/02/2010 - by whiz on 02-16-2010 at 04:58 PM
RE: Interface Writer | [release] 2.7 | 16/02/2010 - by billyy on 02-16-2010 at 05:55 PM
RE: Interface Writer | [release] 2.7 | 16/02/2010 - by whiz on 02-17-2010 at 08:13 PM
RE: Interface Writer | [release] 2.7 | 16/02/2010 - by billyy on 02-17-2010 at 08:23 PM
RE: Interface Writer | [release] 2.7 | 16/02/2010 - by whiz on 02-18-2010 at 08:57 AM
RE: Interface Writer | [release] 2.7 | 16/02/2010 - by billyy on 02-18-2010 at 08:03 PM
RE: Interface Writer | [release] 2.7 | 16/02/2010 - by whiz on 02-18-2010 at 08:18 PM
RE: Interface Writer | [release] 2.7 | 16/02/2010 - by billyy on 02-18-2010 at 08:21 PM
RE: Interface Writer | [release] 2.7 | 16/02/2010 - by whiz on 02-20-2010 at 11:27 AM
Interface Writer | [beta] 2.8 | 21/02/2010 - by whiz on 02-21-2010 at 05:28 PM
RE: Interface Writer | [release] 2.7 ~ [beta] 2.8 | 16/02/2010 - by billyy on 02-21-2010 at 06:20 PM
RE: Interface Writer | [beta] 2.8 | 21/02/2010 - by whiz on 02-21-2010 at 06:38 PM
RE: RE: Interface Writer | [beta] 2.8 | 21/02/2010 - by billyy on 02-23-2010 at 04:14 PM
RE: Interface Writer | [release] 2.7 ~ [beta] 2.8 | 16/02/2010 - by SmokingCookie on 02-23-2010 at 10:58 AM
RE: Interface Writer | [release] 2.7 ~ [beta] 2.8 | 16/02/2010 - by whiz on 02-23-2010 at 04:05 PM
RE: RE: Interface Writer | [release] 2.7 ~ [beta] 2.8 | 16/02/2010 - by SmokingCookie on 02-23-2010 at 05:02 PM
RE: Interface Writer | [release] 2.7 ~ [beta] 2.8 | 16/02/2010 - by whiz on 02-24-2010 at 06:51 PM
RE: RE: Interface Writer | [release] 2.7 ~ [beta] 2.8 | 16/02/2010 - by SmokingCookie on 02-24-2010 at 06:57 PM
RE: Interface Writer | [release] 2.7 ~ [beta] 2.8 | 16/02/2010 - by whiz on 02-24-2010 at 07:17 PM
RE: Interface Writer | [release] 2.7 ~ [beta] 2.8 | 16/02/2010 - by SmokingCookie on 02-24-2010 at 07:20 PM
RE: Interface Writer | [release] 2.7 ~ [beta] 2.8 | 16/02/2010 - by whiz on 02-24-2010 at 07:25 PM
RE: Interface Writer | [release] 2.7 ~ [beta] 2.8 | 16/02/2010 - by SmokingCookie on 02-24-2010 at 07:30 PM
RE: Interface Writer | [release] 2.7 ~ [beta] 2.8 | 16/02/2010 - by billyy on 02-26-2010 at 11:21 PM
RE: Interface Writer | [release] 2.7 ~ [beta] 2.8 | 16/02/2010 - by whiz on 02-28-2010 at 10:15 AM
RE: Interface Writer | [release] 2.7 ~ [beta] 2.8 | 16/02/2010 - by billyy on 02-28-2010 at 01:05 PM
RE: Interface Writer | [release] 2.7 ~ [beta] 2.8 | 16/02/2010 - by whiz on 02-28-2010 at 01:37 PM
RE: Interface Writer | [release] 2.7 ~ [beta] 2.8 | 16/02/2010 - by billyy on 02-28-2010 at 01:40 PM
RE: Interface Writer | [release] 2.7 ~ [beta] 2.8 | 16/02/2010 - by whiz on 02-28-2010 at 02:53 PM
RE: Interface Writer | [release] 2.7 ~ [beta] 2.8 | 16/02/2010 - by billyy on 02-28-2010 at 02:58 PM
RE: Interface Writer | [beta] 2.8 | 16/02/2010 - by whiz on 03-02-2010 at 03:46 PM
RE: Interface Writer | [release] 2.9 | 10/03/2010 - by whiz on 03-10-2010 at 08:26 PM
RE: Interface Writer | [release] 2.9 | 10/03/2010 - by SmokingCookie on 03-14-2010 at 09:42 AM
RE: Interface Writer | [release] 2.9 | 10/03/2010 - by whiz on 03-14-2010 at 11:11 AM
RE: Interface Writer | [release] 2.9 | 10/03/2010 - by whiz on 05-24-2010 at 08:38 PM
RE: Interface Writer | [release] 2.9 | 10/03/2010 - by SmokingCookie on 05-25-2010 at 07:17 PM
RE: Interface Writer | [release] 2.9 | 10/03/2010 - by matty on 05-25-2010 at 07:32 PM
RE: Interface Writer | [release] 2.9 | 10/03/2010 - by whiz on 05-26-2010 at 06:25 PM
RE: Interface Writer | [beta] 3.0 (+ [release] 2.9) | 17/06/2010 (+ 10/03/2010) - by mynetx on 06-17-2010 at 08:26 AM
RE: Interface Writer | [beta] 3.0 (+ [release] 2.9) | 17/06/2010 (+ 10/03/2010) - by whiz on 06-17-2010 at 08:39 AM
RE: Interface Writer | [beta] 3.0 r2 | 24/07/2010 - by whiz on 07-24-2010 at 04:34 PM
RE: RE: Interface Writer | [beta] 3.0 r2 | 24/07/2010 - by SmokingCookie on 07-25-2010 at 06:53 AM
RE: Interface Writer | [beta] 3.0 r2 | 24/07/2010 - by whiz on 07-25-2010 at 09:46 AM
RE: Interface Writer | [beta] 3.0 r2 | 24/07/2010 - by SmokingCookie on 07-25-2010 at 09:52 AM
RE: Interface Writer | [beta] 3.0 r2 | 24/07/2010 - by whiz on 07-25-2010 at 10:05 AM
RE: Interface Writer | [beta] 3.0 r2 | 24/07/2010 - by SmokingCookie on 07-25-2010 at 04:30 PM
RE: Interface Writer | [beta] 3.0 r2 | 24/07/2010 - by whiz on 07-25-2010 at 04:40 PM
RE: Interface Writer | [beta] 3.0 r2 | 24/07/2010 - by SmokingCookie on 07-25-2010 at 04:44 PM
RE: Interface Writer | [release] 3.0 | 22/08/2010 - by whiz on 08-22-2010 at 03:28 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