So I'm trying to have AutoIt interact with a compiled Python script using StdoutRead and StdinWrite, but it's a little weird. This is the Python script that I've compiled to test.exe using py2exe import time
while 1:
try:
print(raw_input())
except:
pass
time.sleep(.05) and this is the AutoIt code #include<debug.au3>
HotKeySet('{end}','close')
HotKeySet('{home}','test')
$shell=Run(@MyDocumentsDir & '\Python\test.exe',@WorkingDir,@SW_SHOW,9)
_DebugSetup()
_DebugOut('test.exe')
Sleep(500)
While 1
Sleep(50)
$msg=StdoutRead($shell)
If $msg<>'' Then
_DebugOut($msg)
EndIf
Wend
Func test()
StdinWrite($shell,"this is a test"&@CRLF)
EndFunc
Func close()
ProcessClose($shell)
Exit
EndFunc It looks to me like it should add 'this is a test' to the debug every time I press Home, but it doesn't. It's like it waits till test.exe closes to do anything. If you run it, hit Home a few times, and close the test.exe window, 'this is a test' pops up for however many times you hit Home, but I really don't get why it waits till you close it. If you run test.exe by itself and type something in, it works as expected. test.exe