Jump to content

Recommended Posts

Posted

Howdy.

When running commands with

Run(@ComSpec & " /c " & 'commandName', "", @SW_HIDE)

The returned text is truncated by the width of the console. How would this be increased so it's not truncated?

I have set Window's default console window size to be wider, but it seems to have no effect.

Posted (edited)

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
Posted

Maybe it's particular to the program I'm running then (which is tf, microsoft's cli to team foundation server).

Thanks for taking the time to check it for me.

You're a fellow linux user?

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
  • Recently Browsing   0 members

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