quote:Originally posted by mynetx
I like this script very much. In fact here is a suggestion I'd love to see:
Parse window XML of existing windows, and allow to edit them.
I thought about that, but I have no idea of how to read and edit existing XML files.
This post was edited on 06-15-2009 at 06:44 PM by whiz.
JScript code:function GetScriptFolder() {
var fso = new ActiveXObject("Scripting.FileSystemObject");
var ret = fso.GetFolder(MsgPlus.ScriptFilesPath + "\\..").Path;
fso = null; // Clean up
return ret;
}
Works for me..
EDIT::
Checking whether 'something' exists within an object:
JScript code:var myObj = new Object();
myObj.someProperty = "Hello world!";
if("someProperty" in myObj) Debug.Trace("Exists!");
if("someOtherProperty" in myObj /* this is false; code won't be run */) Debug.Trace("Exists");
This post was edited on 06-14-2009 at 05:37 PM by SmokingCookie.
quote:Originally posted by SmokingCookie
About the scripts' folder: I use this method:
JScript code:function GetScriptFolder() {
var fso = new ActiveXObject("Scripting.FileSystemObject");
var ret = fso.GetFolder(MsgPlus.ScriptFilesPath + "\\..").Path;
fso = null; // Clean up
return ret;
}
quote:Originally posted by mynetx
Maybe the attached library gives you an idea.
Umm... I'm afraid I don't really understand that. All I get is that XML comes in nodes, and the script would read each "child" node of each "parent", and put it into the arrays (e.g. the first control ID of the first window into the WndCtrlIDs[0][0] variable). But I have no idea how to do it...
This post was edited on 06-15-2009 at 06:44 PM by whiz.