SublimePorte Posted July 5, 2010 Share Posted July 5, 2010 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. Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 6, 2010 Share Posted July 6, 2010 Post a short, running example script of how you are collecting the output, i.e. StdOutRead(), redirect to a file, environment variable? 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 More sharing options...
SublimePorte Posted July 7, 2010 Author Share Posted July 7, 2010 Just the same as the stock standard example in the help file: $output = Run($mycommand, @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) While 1 $lines &= StdoutRead($output) If @error Then ExitLoop WEnd Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 7, 2010 Share Posted July 7, 2010 (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) 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 July 7, 2010 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 More sharing options...
SublimePorte Posted July 9, 2010 Author Share Posted July 9, 2010 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? Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 9, 2010 Share Posted July 9, 2010 You're a fellow linux user?Whenever I have that option, yes. 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now