Modify

Opened 16 years ago

Closed 16 years ago

#514 closed Bug (No Bug)

StdoutRead seems broken on latest public & beta

Reported by: robinacjohnston@… Owned by:
Milestone: Component: AutoIt
Version: 3.2.12.1 Severity: None
Keywords: Cc:

Description

Updated to the latest Public (3.2.12.1) today so as to gain support for Windows 2008 OS Type and found my script no longer worked. On debuging found that StdoutRead no longer appears to work. Command I'm using follows the example code exactly as indicated below...

$return = Run("c:\tester.bat", "c:\", @SW_HIDE, $STDOUT_CHILD)
$line = StdoutRead($return)
MsgBox(0, "STDOUT read:", $line)

Should also mention that I tried using @Comspec too, but made no difference. Also, developed on XP for use on Windows 2008 -32bit, but also would not work on XP -32bit.

Final point, re-installed previous autoit version and all work fine

Attachments (0)

Change History (3)

comment:1 Changed 16 years ago by anonymous

OK, Having played with this a while longer I realize what the actual change now is. Need to read data from it in a loop with the first item always being blank. Good to have the loop to retrieve all the data, but what is the point in the first item being blank? It saves a lot of silly code for whn just want a single digit or word returned....

comment:2 follow-up: Changed 16 years ago by anonymous

Sorry to be a pain, but was not understanding fully the implications of non blocking behaviour. Since it no longer waits for application to respond, if you do the stdoutread next, you get nothing back because the launched app or command has not had the chance to return its result. I can see the use in this, but surely most uses want to have blocking so that when you do the stdoutread you get the returned output without having to create code to wait for it every time. Could at least mention in help file that now need a processwaitclose before doing the read...

Not meaning to bitch.... very cool app overall!

comment:3 in reply to: ↑ 2 Changed 16 years ago by Valik

  • Resolution set to No Bug
  • Status changed from new to closed

Replying to anonymous:

Could at least mention in help file that now need a processwaitclose before doing the read...

But that is only true if you actually want to wait until the process closes.

Honestly? Your code as written before was flawed. You should have always been relying on ProcessWaitClose() anyway. There was no guarantee your old way would actually return all the text you wanted.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.