1
Technical forum / Re: GetFiles and packages
« on: December 23, 2007, 02:10:49 PM »
That's unfortunate. I would settle for a function that gives me all files in a package. Maybe in a later version?
Thanks
Banbury
Thanks
Banbury
Latest WME version: WME 1.9.1 (January 1st, 2010) - download
// this class initializes COM support and has to be a created once (and only once) before you can use any other COM object
var com = new WMECom();
// Create a new COM object
var xml = new WMEComObject("MSXML2.DomDocument");
// node holds the COM-Object as a WME plugin-object
var node = xml.createElement("Node1");
xml.appendChild(node);
node.text = "This is a new node.";
Game.LOG(xml.xml);
IWMEValue *v1 = Game->CreateValue();
v1->SetVal("Pointer");
IWMEValue *v2 = Game->CreateValue();
v2->SetVal(v.intValue); // This is the IDispatch pointer cast to integer
v1->SetProperty("p", v2);
Value->SetVal(v1); //This is the return variable of GetProperty
// this class initializes COM support and has to be a created once (and only once) before you can use any other COM object
var com = new WMECom();
// Create a new COM object
var xml = new WMEComObject("MSXML2.DomDocument");
// This variable holds the original pointer to the node
var node = xml.createElement("Node1");
// and it is passed to the function without wrapping
xml.appendChild(node);
// We have to wrap it here, before we can use properties and functions.
var o_node = new WMEComObject(node);
o_node.text = "This is a new node.";
Game.LOG(xml.xml);
// Objects of type WMEComObject should be released when no longer needed.
o_node.Release();
xml.Release();