Modify

Opened 11 years ago

Closed 11 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 Changed 11 years ago by Valik

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

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)

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.