Jump to content

A simple way to download 2 files at same time...


A. Percy
 Share

Recommended Posts

I posted it first at Two Part Questions

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

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

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

nice idea but only possible with autoit installed ^^

With compiled scritps works too :rolleyes:

Try it.

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

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

sure but only if you installed autoit...

but I actually dont have a pc without autoit to test it ^^

It worked well when compiled and running on a Virtual Machine without installed autoit.

Edit: If you look at the script, you can see that @AutoItExe Macro

Looking at Help:

@AutoItExe -> The full path and filename of the AutoIt executable currently running. For compiled scripts it is the path of the compiled script.

Looking at Help of Command Line Parameters:

"Form3: Compiled.exe [/ErrorStdOut] [/AutoIt3ExecuteScript file] [params ...]

Execute another script file from a compiled AutoIt3 Script File. Then you don't need to fileinstall another copy of AutoIT3.exe in your compiled file.

Form4: AutoIt3.exe [/ErrorStdOut] /AutoIt3ExecuteLine "command line"

Execute one line of code."

It means that to execute "/AutoIt3ExecuteLine" dont requires installed autoit

Regards

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

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...