ConsoleRead() can't be blocking until the line is closed like it looked like it was doing as illustrated by my question here: http://stackoverflow.com/questions/14189032/java-reading-and-writing-to-input-and-output-stream-of-autoit-script/14226605#14226605 , but I was still having trouble (explained in the answer there) because I think ConsoleRead() is a bit unpredictable in terms of when it will return. Nothing I sent to it would force it to recognize a new line and so my solution will likely be the one illustrated in the answer linked. If there's another way to go about the problem, please let me know and/or fill me in on anything you know about consoleRead() that would clarify things. The orignal problem script was something very close to that question. The new problem (where I see ConsoleRead() doesn't block until the line is closed) can of course be illustrated by any script with ConsoleRead() when multiple lines are sent to it's STDIN regardless of the delimiter.
The helpfile says: That isn't the case. A single call to ConsoleRead() will return the entire stream and block until the stream has been closed. Does anyone know a way around this? This auto-it script is a child process of another, non-autoit program so StdoutRead (for child processes) will not work.
I'm trying to write to the output stream and read the input stream of a simple Autoit script from java. If I do not use the newLine() character, I get the expected output: a line is sent to auto it, a line is sent to java, and that is repeated. If I add the newLine() character, it seems every cycle an extra line is sent to autoit. Why would this be? Seems like ConsoleRead() doesn't acknowledge cr or lf as EOF.
Yes. ControlFocus, WinExists, and similar functions were not working with the title alone, I had to include text from the window or control. Also, I don't know why IfMsgBox is listed as a function, but It obviously wasn't what I was looking for.
That wasn't working either. I played around and got it to work by using some of the text in the window. There are no controls for the window itself, only "basic window info." I can't figure out why I can't find the window with the basic info.
I'm using software that occasionally pops up an alert titled 'Confirm' with the options 'yes' and 'no.' I want to automatically sent {ENTER} when it pops up, but this does not seem to be doing the trick. What am I missing?
Here's the entire script:
while 1
While WinExists("Confirm")
WinActivate("Confirm")
Send("{ENTER}")
WEnd
WEnd