shEiD Posted January 26, 2008 Share Posted January 26, 2008 (edited) Hi, I am having a problem with using StdoutRead on command line sfv file checkers. I've tried all that I could find: cfv-1.18.1 Command_Line_SFV_Checker_v0.1 FSUM 2.52 pure-sfv_0.3 and all of them have the same effect: StdoutRead reads out the output only after the file checking/creating is complete. Even though, e.g. if using cfv in command line (without autoit) I can clearly see, that eg: console outputs every single file separately, when its being processed, when I use StdoutRead doesn't read anything during file creation or verifying time and spits out the whole thing, when it finished... Am I to understand that its a common thing (some kind of "special" type of output to console), that ALL command line sfv checkers have? I managed to work things out with StdoutRead and winrar's console. Its works fine. Just not any sfv tool Please, help me to figure this out and make it work. Maybe you know of some other command line sfv app(s) I could try. Or maybe you could help me out with that damn StdoutRead on any of these ones. Example of code that I use: $sfvCmd = 'C:\WINDOWS\cfv.bat -p "' & $destinationDir & '" -C -v -f "' & $filename & '.sfv"' $proc = Run($sfvCmd, @ProgramFilesDir, @SW_HIDE, 2) $sleep = 100 While 1 If $proc Then $charsWaiting = StdoutRead($proc, 0, 1) If @error = -1 Then $proc = 0 ExitLoop EndIf If $charsWaiting Then $currentRead = StdoutRead($proc) ConsoleWrite(@LF & @LF & "$currentRead = " & $currentRead & @LF) EndIf Sleep(100) EndIf WEnd I need StdoutRead output to work properly to be able to update the progress bar in my GUI, (like It works like a charm with winrar). Thats is the main reason why its not good, that its being spit out all at once when sfv is complete. Thanks in advance for any help. Edited January 26, 2008 by shEiD Link to comment Share on other sites More sharing options...
martin Posted January 26, 2008 Share Posted January 26, 2008 Hi, I am having a problem with using StdoutRead on command line sfv file checkers. I've tried all that I could find: cfv-1.18.1 Command_Line_SFV_Checker_v0.1 FSUM 2.52 pure-sfv_0.3 and all of them have the same effect: StdoutRead reads out the output only after the file checking/creating is complete. Even though, e.g. if using cfv in command line (without autoit) I can clearly see, that eg: console outputs every single file separately, when its being processed, when I use StdoutRead doesn't read anything during file creation or verifying time and spits out the whole thing, when it finished... Am I to understand that its a common thing (some kind of "special" type of output to console), that ALL command line sfv checkers have? I managed to work things out with StdoutRead and winrar's console. Its works fine. Just not any sfv tool Please, help me to figure this out and make it work. Maybe you know of some other command line sfv app(s) I could try. Or maybe you could help me out with that damn StdoutRead on any of these ones. Example of code that I use: $sfvCmd = 'C:\WINDOWS\cfv.bat -p "' & $destinationDir & '" -C -v -f "' & $filename & '.sfv"' $proc = Run($sfvCmd, @ProgramFilesDir, @SW_HIDE, 2) $sleep = 100 While 1 If $proc Then $charsWaiting = StdoutRead($proc, 0, 1) If @error = -1 Then $proc = 0 ExitLoop EndIf If $charsWaiting Then $currentRead = StdoutRead($proc) ConsoleWrite(@LF & @LF & "$currentRead = " & $currentRead & @LF) EndIf Sleep(100) EndIf WEnd I need StdoutRead output to work properly to be able to update the progress bar in my GUI, (like It works like a charm with winrar). Thats is the main reason why its not good, that its being spit out all at once when sfv is complete. Thanks in advance for any help. What do yu get if you have $charsWaiting = StdoutRead($proc, -1, 1) ? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
shEiD Posted January 26, 2008 Author Share Posted January 26, 2008 What do yu get if you have $charsWaiting = StdoutRead($proc, -1, 1)?I get the same: nothing until processing and the whole list, after cfv is done . 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