Jump to content
Sign in to follow this  
AL3X

--

Recommended Posts

AL3X

--

Edited by AL3X

Share this post


Link to post
Share on other sites
AL3X

--

Edited by AL3X

Share this post


Link to post
Share on other sites
ProgAndy

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
Greenhorn

Hi,

look at this, please

If 1 <= $streamcounterwget Then

, isn't it ?

Greetz

Greenhorn

Share this post


Link to post
Share on other sites
AL3X

--

Edited by AL3X

Share this post


Link to post
Share on other sites
ProgAndy

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
AL3X

--

Edited by AL3X

Share this post


Link to post
Share on other sites
Greenhorn

But it doenst work :). Which should I use ? Stdout or Stderr ?

Use StdOutRead instead and don't forget

While 1
        $line = StdoutRead($PID)
        If @error Then ExitLoop
        
    WEnd

Share this post


Link to post
Share on other sites
AL3X

--

Edited by AL3X

Share this post


Link to post
Share on other sites
Greenhorn

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
AL3X

--

Edited by AL3X

Share this post


Link to post
Share on other sites
Greenhorn

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
AL3X

--

Edited by AL3X

Share this post


Link to post
Share on other sites
Greenhorn

Oh, I see that I've forgot the most important ...

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

Share this post


Link to post
Share on other sites
Greenhorn

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
Greenhorn

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
MrChiliCheese

Hey,

i have the same problem at the moment... i'm using StdoutRead(), but the text is een only in the textbox from scite...

how can i read this text out?

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  

×