coding UTF-8; // Load required libraries import File; import Process; // Get the absolute path of the program file to run string programPath = getFilePath("program.exe"); // Prepare the program so it can be executed int processID = newProcess(programPath); // If Japanese text in the I/O becomes garbled, specify encodings here // setProcessInputEncoding(processID, "CP932"); // setProcessOutputEncoding(processID, "CP932"); // setProcessErrorEncoding(processID, "CP932"); // Run the program and wait for it to finish startProcess(processID); waitForProcess(processID); // Get the program's output and print it to the VCSSL console (black window) string output = getProcessOutput(processID); println(output);