Lazycat Posted February 25, 2006 Share Posted February 25, 2006 Long time ago I bring question about reading console. Problem was, that Autoit I/O functions are not work in some cases and retreive only "last" info, not intermediate. This problem was not solved at that time.Now I again faced with this, spend a bit more time and found solution. Nothing new here, many pieces of code was at forum, so I can call this compilation. Example shows how to constantly retreive compression percentage and progress data from UPX compressor and update GUI with this data (UPX not included, this exists in the "Aut2exe" subfolder in the Autoit installation folder, just copy upx.exe to example's directory).Only problem I have with this - how to avoid visual appearing of empty console? Now I hide it's window, but console anyway appears for moment. Any thoughs about this?DConsole.zip Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
nfwu Posted February 26, 2006 Share Posted February 26, 2006 I did not have this problem, when i wrote my Wood's Installation GUI, the external compression tool which i used out puted like this: where {chr8} represents the backspace character Complete: 0%{chr 8}{chr 8}{chr 8}40%{chr 8}{chr 8}{chr 8}90%{chr 8}{chr 8}{chr 8}100% was not a problem, i just read as normal and ignored the backspace characters. TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
WeMartiansAreFriendly Posted August 14, 2008 Share Posted August 14, 2008 Hi, Do you have an update for your script? I don't know if it's an interference with scite but the console output is always grabbed by scite, I never get any output in the msgbox, even if I compile a script I still get no output.. It's rather odd. #include "DConsole.au3" Local $foo = _DConsoleRun(@ComSpec & " /c dir foo.bar", @SystemDir, @SW_HIDE) Local $line While ProcessExists($foo) $line = _DConsoleRead() MsgBox(0, "STDOUT read:", $line) Wend _DConsoleFree() Local $foo = Run(@ComSpec & " /c dir foo.bar", @SystemDir, @SW_HIDE, 2 + 4) Local $line While 1 $line = StdoutRead($foo) If @error Then ExitLoop MsgBox(0, "STDOUT read:", $line) Wend While 1 $line = StderrRead($foo) If @error Then ExitLoop MsgBox(0, "STDERR read:", $line) Wend Exit Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet() Link to comment Share on other sites More sharing options...
damian666 Posted August 15, 2008 Share Posted August 15, 2008 yes, i agree... it will only put tuff out in scite. any idaes? Damian666 and proud of it!!! 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