#include <INet.au3>
Dim $rar, $path,$rul
$url = "http://www.123.com/1.rar"
$rar = "c:\1.rar"
$path = "c:\1"
$load = InetGet($url, $rar, 1, 1)
ProgressOn("正在下载", "正在为你下载,请稍后.....")
While 1
If InetGetInfo($load, 2) = True Then ExitLoop
InetGetInfo($load, 1)
$rou = Round(InetGetInfo($load, 0) / InetGetInfo($load, 1), 2) * 100
ProgressSet($rou, "已下载:" & $rou & "%")
Sleep(100)
WEnd
ProgressSet(100, "下载完成")
ProgressOff()
$pid=Run(@ProgramFilesDir & "\winrar\rar.exe x -y c:\1.rar c:\1","",@SW_HIDE)
Do
Sleep(100)
Until ProcessExists($pid) = 0
FileDelete($path & "*.reg")
FileDelete($path & "*.txt")
FileDelete($path & "*.html")
$sousuo=FileFindFirstFile("c:\1\*.exe")
$file=FileFindNextFile($sousuo)
Run($path & $file)
Exit
以上代码 要如何修改成批量下载?
$url = "http://www.123.com/1.rar"
$url = "http://www.123.com/2.rar"
$url = "http://www.123.com/3.rar"
这样的然后解压到同个文件夹再运行1.exe
跪求高手的帮助! |