AHK v1 version/discussion moved to this thread.
- For one-time data collection: var := CliData(inCommand)
- For streaming collection: obj := cli.new(inCommand, options := "", environment := "cmd", params := "/Q")
Please see example script for detailed examples, and the main class script for detailed docs.
- New wrapper function CliData(inCommand) for easy inline one-time data collection from a program.
- Easy collection of streaming output with callback functions, can handle multiple CLI sessions simultaneously
- Creates a hidden console window so that CTRL+C and CTRL+Break can still be passed to halt execution with hotkey, button, etc.
- Interactive CLI mode in the background, write to StdIn directly.
- Capture StdErr separately, if desired.
- Pass dynamically created multi-line batch commands executed in succession.
- Define a callback for when a command returns and the prompt is displayed again.
- Define a "Quit String" to automatically halt execution, clean up processes and handles, and trigger a callback.
- Capture console animations like incrementing percent, or progress bar.
- Windows batch
- Android ADB
Download on GitHub
Huge thanks to the following users:
Details of their contributions are in the comments of the CLI class library. They have done a LOT. Without their contributions, I would not have gained the knowledge or the means to make this.@segalion , @Sweeet, @sean , @maraksan_user, @SKAN , @HotKeyIt , @maz_1, @lexikos , @TheGood, @just me, @joedf
I'm happy to hear any commets/critiques to make this library more useful, fast, and memory-efficient.