import File; import Process; // Get the absolute path of example.exe //(Relative paths or just the filename might fail depending on the environment) string programPath = getFilePath("example.exe"); // Create and run the process for example.exe // ("argA/B/C" are arguments passed to the program) string processArgs[] = { programPath, "argA", "argB", "argC" }; int processID = newProcess(processArgs); startProcess(processID); // Event handler for standard output void onProcessOutput(int sourceProcessId, string text) { print(text); } // Event handler for standard error void onProcessError(int sourceProcessId, string text) { print(text); }