I just got a nice idea for a feature! What do you think about creating a Plus! window based on an actual string instead of creating it based on a file name? That way, we could first load the XML in the script, make some changes and then create the window, like this:
code:
var txt = new ActiveXObject("Scripting.FileSystemObject").GetFile(MsgPlus.ScriptFilesPath + "\\Windows.xml").OpenAsTextStream(1, -1).ReadAll();
txt = txt.replace("helol", "hello");
var PlusWnd = MsgPlus.CreateWndFromString(txt, "WndPref");
Or, another thing: creating a window based on a XML DOM node object, like:
code:
var node = xml.selectSingleNode("//Window[@Id='WndPref']");
var PlusWnd = MsgPlus.CreateWndFromNode(node);
Both of these examples could save CPU usage because you don't need to re-save the file since you just send it right to the Plus! Scripting API, and it lets developers make some routine changes to the XML before creating the window, making translating windows a lot easier and faster. Well, what do you think?