Modify

Opened 17 years ago

Closed 17 years ago

#636 closed Bug (No Bug)

StdoutRead function seems to now miss data on public and beta releases

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

Description

I updated to the latest Public (3.2.12.1) and found my script no longer worked. On debuging found that StdoutRead failed to return all of the data, it seems to miss the last line. Here is my test script.

#include <Constants.au3>

$STDOUTData = ""
$Cipher = Run (@SystemDir & "\cipher " & """" & @MyDocumentsDir & """", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)

While 1

$LineData = StdoutRead ($Cipher)
If @error Then ExitLoop
$STDOUTData = $STDOUTData & $LineData

Wend

MsgBox (0, "STDOUT Read Data:", $STDOUTData)

On versions before the Stdoutread function was changed, you get..

Listing C:\Documents and Settings\TestUser\
New files added to this directory will not be encrypted.

U My Documents

On the new versions you only get...

Listing C:\Documents and Settings\TestUser\
New files added to this directory will not be encrypted.

Attachments (0)

Change History (1)

comment:1 by Valik, 17 years ago

Resolution: No Bug
Status: newclosed

You exit the loop before you append the last line. The loop should be:

$STDOUTData &= StdoutRead ($Cipher)
If @error Then ExitLoop

Or even better:

ProcessWaitClose($Cipher)
$STDOUTDATA = StdoutRead($Cipher)

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.