12-16-2015, 11:22 AM
Quote:Alternatively, can I run example.exe directly from QM, send commands to it and get its output in QM (while keeping example.exe active)?
Try this class.
Macro ConsoleProcess help
;Starts a console process. Can read its output and write input.
;Unlike <help>RunConsole2</help>, allows to capture console output immediately, not when the process ends.
;EXAMPLES in test folderMacro test ConsoleProcess.WriteStdin
out
#compile "__ConsoleProcess"
ConsoleProcess x
x.Exec("$my qm$\console3.exe")
str s
int i
for i 1 1000
,if(!x.ReadStdout(s 2)) break
,out F"<{s}>"
,x.WriteStdin(F"input={i}")Function console3
