本帖最后由 shenrenba 于 2010-9-25 17:49 编辑
下面的代码中 进度条只跑了1点 另外 显示也是错误的 请问如何修改?
-----------------------------
换成这 OK 了 $size = Int(InetGetSize($url) / 1024)#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("测试", 623, 442, 192, 124)
$Progress1 = GUICtrlCreateProgress(72, 96, 393, 65)
$Button1 = GUICtrlCreateButton("", 104, 216, 305, 97)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$url = "http://f512.net/gamefiles/20100900/0924/modern_room_escape.swf"
$get = InetGet($url, @ScriptDir & "\asdasd.swf", 1, 1)
$size = Int(InetGetSize($get) / 1024)
AdlibRegister("Down")
EndSwitch
WEnd
Func Down()
$newsize = InetGetInfo($get)
$pro = Int($newsize[0] / 1024) / $size
GUICtrlSetData($Progress1, $pro * 100)
GUICtrlSetData($Button1, "已下载 " & Int($pro * 100) & "%")
EndFunc ;==>Down
|