Jump to content

Width of console


Recommended Posts

Post a short, running example script of how you are collecting the output, i.e. StdOutRead(), redirect to a file, environment variable?

:blink:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

This works fine for me, how do you make it fail?

#include <Constants.au3>

Global $mycommand = "attrib.exe *.*"
Global $output, $lines = ""


$output = Run($mycommand, @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
While 1
    $lines &= StdoutRead($output)
    If @error Then ExitLoop
WEnd

ConsoleWrite("$output = " & $output & @LF)
ConsoleWrite("$lines = " & $lines & @LF)

:blink:

P.S. Output looks like this, and several lines are much longer than 80char:

$output = 3780
$lines = A            C:\Windows\system32\12520437.cpx
A            C:\Windows\system32\12520850.cpx
A   H        C:\Windows\system32\297BB06F-3B76-4e97-12B0-459C0E71B327-2P-0.C7483456-A289-439d-8115-601632D5A000
A   H        C:\Windows\system32\297BB06F-3B76-4e97-12B0-459C0E71B327-2P-1.C7483456-A289-439d-8115-601632D5A000
A            C:\Windows\system32\8point1.wav
A            C:\Windows\system32\aaclient.dll
A            C:\Windows\system32\accessibilitycpl.dll

; ...

A            C:\Windows\system32\xwreg.dll
A            C:\Windows\system32\xwtpw32.dll
A            C:\Windows\system32\zipfldr.dll

+>12:27:47 AutoIT3.exe ended.rc:0
>Exit code: 0    Time: 5.209

;)

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...