Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: survex on November 19, 2014, 05:49:45 am
-
Getting error "ActiveXObject is not defined" executing this script:
!INC Local Scripts.EAConstants-JScript
function main()
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
}
main();
What am I doing wrong?
-
At a guess, you're using the JScript syntax for an ActiveX object inside JavaScript. The example in the help for accessing an ActiveX object from JavaScript is:
this.name="Odd Even";
var logger = new COMObject("MySim.Logger");
logger.Show();
logger.Log("Simulation started");
-
:-*
At a guess, you're using the JScript syntax for an ActiveX object inside JavaScript. The example in the help for accessing an ActiveX object from JavaScript is:
this.name="Odd Even";
var logger = new COMObject("MySim.Logger");
logger.Show();
logger.Log("Simulation started");
That's helped, thank you. By the way, do you know how to read file via scripting?
-
answered to myself here - http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1416345000