Jump to content
Sign in to follow this  
AL3X

--

Recommended Posts

Stringbetween returns an ARRAY :) so:

$PercentCompleted = _StringBetween($readstream, ". ", "% ")

$PercentCompleted = $PercentCompleted [0]


*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

If $VelocidadDeDescarga[0] = 0 Then

??


*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

Try for debugging a func like this

$sWGetDir = @TempDir
$sDestDir = 'C:\Downloads'
$urlVideo = 'http://dl.video/watchme.avi'


$pidWGet = Run($sWGetDir & '\wget.exe -c -P"' & $sDestDir & '" "' & $urlVideo & '"')

$sReadOutput = StreamRead($pidWGet)
If $sReadOutput Then
    $RemainingTime = _StringBetween($readstream, 'K ', 's')
    GUICtrlSetData($TextoTiempoRestante, $RemainingTime & " sec")
   
    $DownloadSpeed = _StringBetween($readstream, '%  ', 'K ')
    GUICtrlSetData($TextoVelocidad, $DownloadSpeed & " Kb/s")
   
    $PercentCompleted = _StringBetween($readstream, ". ", "%  ")
    GUICtrlSetData($TextoPorcientoCompletado, $PercentCompleted & "%")
    GUICtrlSetData($DownloadProgressBar, $PercentCompleted)
EndIf

    

Func StreamRead($PID)
    
    While True
        
        $line = StdoutRead($PID)
        If @error Then ExitLoop
        ConsoleWrite('StdoutRead: ' & $line)
        
    WEnd
    
    While True
        
        $line = StderrRead($PID)
        If @error Then ExitLoop
        ConsoleWrite('StderrRead: ' & $line)
        
    WEnd
    
    Return $line
    
EndFunc

and look what you get from the stream, I will try it also, but a liitle bit later, today.

Maybe at today's evening I can tell you more ... :)

Greetz

Greenhorn

Share this post


Link to post
Share on other sites

It doesnt show anything... :)

Could you help me if I send you the entire code and the file's that I'm using ?

(I'll release the code when its ready :()

Yep, do it ...

Share this post


Link to post
Share on other sites

Do you have email or something ? :S

(Size in total = +/- 3mb)

'User' at 'email' dot 'com' Edited by Greenhorn

Share this post


Link to post
Share on other sites

OK, I got it :)

You can del it ...

I'll come back at evening, now I have to eat alittle bit, my dear ...

C' ya

Greetz

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...