I have a process process.exe which monitors some behavior and prints all the changes into console window in real time as it is running. As a standalone thing it works perfectly.
I need to read its output with lua script. I tried to use the answer provided here:
Read console output realtime in lua
local pipe = io.popen('process.exe "myPath"')
for line in pipe:lines() do
print(line)
end
pipe:close()
The point is, this lua script produces a hanging cmd.exe window and doens't print anything into my LUA console. And only after I close this cmd window the script prints all the output. So I don't know how to solve the problem.