0

For ScriptCs scripts I'd like to write a Script Pack that is using command line arguments.

scriptcs myscript.csx -- some args

Within a script I use ScriptArgs, but is it also available somehow from within a Script Pack?

joeriks
  • 3,382
  • 8
  • 32
  • 42

2 Answers2

2

Yes, the IScriptPackSession interface which is passed to your script pack on initialization now has a property called ScriptArgs :) See the source.

khellang
  • 17,550
  • 6
  • 64
  • 84
1

Not with the current design.

With that said, that's a good idea - I suggest you file an issue on github - https://github.com/scriptcs/scriptcs

Filip W
  • 27,097
  • 6
  • 95
  • 82