进度条问题!
#include <GUIConstants.au3>#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 309, 179, 193, 125)
$Button1 = GUICtrlCreateButton("点击更新", 8, 24, 145, 49, 0)
$Progress1 = GUICtrlCreateProgress(8, 120, 289, 25)
$Label1 = GUICtrlCreateLabel("更新进度:", 8, 88, 55, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
InetGet("http://www.xxxx.com/6.exe", @ScriptDir & "\6.exe", 1, 1)
EndSwitch
WEnd
如何实现点击更新按钮让下面的进度跟着下载进度走!
还有就是更新进度那里 显示被更新的文件名!
[ 本帖最后由 qzdisk 于 2008-7-13 14:57 编辑 ] 补充一下如何批量下载文件!
比如*.rar *.exe
这样下载! #include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 309, 179, 193, 125)
$Button1 = GUICtrlCreateButton("点击更新", 8, 24, 145, 49, 0)
$Progress1 = GUICtrlCreateProgress(8, 120, 289, 25)
$Label1 = GUICtrlCreateLabel("更新进度:", 8, 88, 55, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$Size=InetGetSize("http://down.360safe.com/setup.exe")
InetGet("http://down.360safe.com/setup.exe", @ScriptDir & "\6.exe", 1, 1)
While @InetGetActive
TrayTip ($Size, @InetGetBytesRead,10)
$Prog=@InetGetBytesRead / $Size * 100
GUICtrlSetData($Progress1,$Prog)
WEnd
EndSwitch
WEnd 谢谢!楼上的朋友!
但是还有一个问题就是怎么批量下载!
针对文件数量巨大!没办法一个文件写一段代码!
比如后缀名是5.exe 能否做批量下载 我知道批处理是*.exe 但是不知道AU3是如何写的 能否再赐教!
页:
[1]