extra jscript
Run a Jscript.NET script in Windows Console.
在 Windows 控制台中執行 Jscript.NET 腳本。
- 下載exe檔。
- 複製到
C:Program_FilesScripts
。- 將
C:Program_FilesScripts
加入PATH
環境變數。
> ejscript [-c | --compile] [-o | --output < output binary > ] < input script > [input arguments to script]...
:: [] -> optional argument
:: <> -> argument value
:: run "pokemon.js" with no input arguments
> ejscript pokemon.js
:: run "pokemon.js" with input argument "bulbasaur"
> ejscript pokemon.js bulbasaur
:: run "pokemon.js" with input arguments "bulbasaur --height"
> ejscript pokemon.js bulbasaur --height
:: only compile "pokemon.js", and get its output path
> ejscript --compile pokemon.js
:: set output binary for "pokemon.js" and run
> ejscript --output " C:Games and Appspokemon.exe " pokemon.js
:: set output binary for "pokemon.js" and only compile
> ejscript --output " C:Games and Appspokemon.exe " --compile pokemon.js
:: run "ocolor.cmd" with input arguments "yellow black"
> ejscript ocolor.cmd yellow black