Jump to content

liet

Members
  • Posts

    2
  • Joined

  • Last visited

liet's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. It goes something like this: Local $iPID = Run('PowerShell.exe -executionpolicy Bypass -File "C:\Users\QKXC64\Desktop\script.ps1"') Local $sOutput For $i = 200 To 1 Step -1 $sOutput &= StdoutRead($iPID) Sleep(25) Next MsgBox($MB_SYSTEMMODAL, "", "Received: " & @CRLF & @CRLF & $sOutput)
  2. 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.
×
×
  • Create New...