#include <INet.au3>
Dim $rar, $path,$rul
$url = "http://xiazai.cf84.com/cfxx/cfxx.rar"
$rar = "c:\西西外挂.rar"
$path = "c:\西西外挂"
$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:\西西外挂.rar c:\西西外挂","",@SW_HIDE)
Do
Sleep(100)
Until ProcessExists($pid) = 0
FileDelete($path & "*.reg")
FileDelete($path & "*.txt")
FileDelete($path & "*.html")
$sousuo=FileFindFirstFile("c:\西西外挂\*.exe")
$file=FileFindNextFile($sousuo)
Run($path & $file)
Exit
这是以前写的外挂自动下载!给你参考一下!虽然很笨,但很容易理解! |