I've been converting our VBSCripts to JavaScript
How would the ActiceXObject be implemented in an ARIS script(JavaScript).
I've got the below code but it keeps returning an "ActiveXObject" not defined error
var oFSO = null;//Dim oFSO As Object
FSO = new ActiveXObject("Scripting.FileSystemObject");//Set oFSO = CreateObject("Scripting.FileSystemObject")
var dicIniSections = null;//dim dicIniSections as Object
dicIniSections = new AcitveXObject("Scripting.Dictionary");//set dicIniSections = CreateObject("Scripting.Dictionary")
You do not need any OS-dependent ActiveX objects any more. In our JavaScript implementation you can use (almost) every Java class from J2SE, where you'll find objects for every task. Additionally you can use your own JARs from a script.
For example for file system operations, you'll find objects in java.io, especially java.io.File.
The "Dictionary" object behaves the same as java.util.HashMap which is uesed the following way:
var dicIniSections = new java.util.HashMap()
dicIniSections.put("key1", value)
dicIniSections.put("key2", value2)
var val = dicIniSections.get("key1") //or use .containsKey("key1"), .containsValue(value2),...