import File; import Process; // example.exe の絶対パスを取得 //(相対パスやファイル名だけだと、環境依存で失敗する可能性がある) string programPath = getFilePath("example.exe"); // example.exe のプロセスを生成して実行 //("argA/B/C"はプログラムに渡す引数) string processArgs[] = { programPath, "argA", "argB", "argC" }; int processID = newProcess(processArgs); startProcess(processID); // プロセスの標準出力内容が流れてくるイベントハンドラ void onProcessOutput(int sourceProcessId, string text) { print(text); } // プロセスの標準エラー内容が流れてくるイベントハンドラ void onProcessError(int sourceProcessId, string text) { print(text); }