Solution: How to read standard stream out (StdOut) from ConsoleWrite in an uncompiled script I'm looking for a way to make one host script start up and communicate with several uncompiled scripts. The uncompiled scripts are modules which are ideally written by other developers. Therefore IPC on the module side has to be simple and fast to test and debug. Put simply, if the module can exist of ConsoleWrite and get parameters from $CmdLine it will be perfect. Assume AutoIt binaries from installer
Thank you, your reply led me to the solution. It didn't occur to me that I could use a compiled master script to run uncompiled scripts and capture output from them. For my own convenience, I have made a little wrapper executable which executes the uncompiled script.
wrapper.au3
#AutoIt3Wrapper_Change2CUI=y
$h = Run(@AutoItExe & ' /AutoIt3ExecuteScript "' & $CmdLine[1] & '"', "", @SW_HIDE, 2)
While 1
$d = StdoutRead($h)
If @error Then ExitLoop
ConsoleWrite($d)
WEnd
I compile