Skip to content

Instantly share code, notes, and snippets.

@u1f992
Last active October 22, 2020 04:26
Show Gist options
  • Select an option

  • Save u1f992/5cacba7cdc8ff6927f44175e9e0c8e57 to your computer and use it in GitHub Desktop.

Select an option

Save u1f992/5cacba7cdc8ff6927f44175e9e0c8e57 to your computer and use it in GitHub Desktop.
ffmpegでflacへ変換(JScript)
// JScript Interactive Shell
// JScript 簡易対話型シェル
// CScript.exe での起動を強制する
if (WScript.FullName.slice(-"*Script.exe".length).toLowerCase() == "wscript.exe") {
var strArgs = "";
for (var i = 0; i < WScript.Arguments.Count(); i++) {
strArgs += " \"" + WScript.Arguments.Item(i) + "\"";
}
new ActiveXObject("WScript.Shell").Run("cscript \"" + WScript.ScriptFullName + "\"" + strArgs);
WScript.Quit(0);
}
WScript.Echo("JScript Interactive Shell\n");
while (true) {
WScript.StdOut.Write(">>> ");
try {
eval(WScript.StdIn.ReadLine());
} catch (e) {
WScript.Echo(e.message);
}
}
// 他のjsファイルを参照(includeもどき)
// eval(new ActiveXObject("Scripting.FileSystemObject").OpenTextFile("C:\\hoge\\fuga\\piyo.js").ReadAll());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment