コンパイル&実行
簡単な実験するときにサクっとコンパイルするだけのスクリプト for 自分。
家で同じもの書くのが嫌だからメモがわり。
// JCompile.ms #command Compile #command Execute var rtMessage = null; switch(command){ case("Compile"): output[7].clear(); rtMessage = runCommand("javac " + getFilePath().replace(/^.*[\\\/]/, ""), getFilePath().replace(/[\\\/]([^\\\/]+)$/, "")); if(rtMessage == 0){ output[7].writeln("コンパイルが成功しました。"); } beep(); output.select(7); break; case("Execute"): output[7].clear(); var para = inputBox("パラメータ入力","プログラムへ渡す引数を入力してください"); runCommand("java " + getFilePath().replace(/^.*[\\\/]/, "").split(/\./)[0] + " " + para,getFilePath().replace(/[\\\/]([^\\\/]+)$/, "")); beep(); output.select(7); break; }