This is an old revision of the document!
Running an Executable from a Script
In MIStudio you can use the CommmandExecutor to run an external executable or script (.sh or .bat).
var Runtime = Java.type("java.lang.Runtime"); var Process = Java.type("java.lang.Process"); //This runs the external program //Consider running this in its own Thread try { // Command to create an external process command = "notepad"; // Running the above command run = Runtime.getRuntime(); proc = run.exec(command); //will launch notepad.exe on windows } catch (e) { print("error in script: \n"+e.stack); } output="finished";