I am looking for a way to automate an interactive PowerShell script. In essence, it writes some data to the screen using the write-host cmdlet and then wait for keyboard input. I would like to be able to either run the PS script via AutoIT or run the PS script separately and make AutoIT focus on the window.
I can handle the input part using Send function, but I can't seem to be able to read the content of the window.
So far I have tried with StdoutRead, ConsoleRead and WinGetText, but I can't seem to be able to pull any text from the console window. If anyone has done something like this before, I would very much welcome the help with my problem.