Sign in to follow this  
Followers 0
AcidCorps

Two Part Questions (Downloading)

3 posts in this topic

Topic Description says it all

How can I have two downloads going with two progress bars in one GUI/Window

Downloads will be taken from $vars set by ini if it makes a different but I don't see how it would

I don't have a script to show you as that will be the first part

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Picked from AutoIt Help file:

"Function Reference

InetGet

...

Note, only one download can be active at once, if you call the function again before a download is complete it will fail."

Part 1: simultaneous downloads - no chance

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.2.4.9
 Author:         Alexsandro Percy

 Script Function:
    Simple Two Progress Bars Demonstration

#ce ----------------------------------------------------------------------------

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$frmProgress = GUICreate("Two Progress", 440, 81, 193, 115)
$prbOne = GUICtrlCreateProgress(8, 20, 421, 17)
GUICtrlSetData(-1, 25)
$prbTwo = GUICtrlCreateProgress(8, 40, 421, 17)
GUICtrlSetData(-1, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

For $i = 1 to 100 step 10
    GUICtrlSetData ( $prbOne, $i )
    For $j = 1 to 100 step 5
        GUICtrlSetData ( $prbTwo, $j  )
        Sleep( 500 )
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                Exit
        EndSwitch
    Next
Next

Part 2: Two progress bars one window - ok

Edited by A. Percy

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator[center] VW Bug user[/center]Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

You forced me to think about and I found this solution, but without any status of download

Se bellow:

Func _DownloadUrl( $URL, $DestFile, $Reload = 0 )
    Local $CmdLine = "InetGet( '" & $URL & "', '" & $DestFile & "', " & $Reload & " )"
    Return Run( @AutoItExe & " /AutoIt3ExecuteLine """ & $CmdLine & """", @ScriptDir, 2 )
EndFunc

$Dowload1 = _DownloadUrl( "http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3.2.4.9-setup.exe", @ScriptDir & "\autoit-v3.2.4.9-setup.exe" )
$Dowload2 = _DownloadUrl( "http://www.autoitscript.com/cgi-bin/getfile.pl?../autoit3/scite/download/SciTE4AutoIt3.exe", @ScriptDir & "\SciTE4AutoIt3.exe" )

While ProcessExists( $Dowload1 ) or ProcessExists( $Dowload2 )
    Sleep( 100 )
Wend

:rolleyes:

Edited by A. Percy

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator[center] VW Bug user[/center]Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral

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  
Followers 0