找回密码
 加入
搜索
查看: 2381|回复: 3

进度条问题!

[复制链接]
发表于 2008-7-13 00:22:40 | 显示全部楼层 |阅读模式
#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://[/url]www.xxxx.com/6.exe", @ScriptDir & "\6.exe", 1, 1)
 EndSwitch
WEnd






如何实现点击更新按钮让下面的进度跟着下载进度走!
还有就是  更新进度那里 显示被更新的文件名!

[ 本帖最后由 qzdisk 于 2008-7-13 14:57 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
 楼主| 发表于 2008-7-13 00:44:32 | 显示全部楼层
补充一下如何批量下载文件!
比如*.rar *.exe

这样下载!
发表于 2008-7-13 01:22:20 | 显示全部楼层
#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
 楼主| 发表于 2008-7-13 02:44:06 | 显示全部楼层
谢谢!楼上的朋友!

但是还有一个问题就是怎么批量下载!

针对文件数量巨大!没办法一个文件写一段代码!

比如后缀名是5.exe 能否做批量下载 我知道批处理是*.exe 但是不知道AU3是如何写的 能否再赐教!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-4-26 15:01 , Processed in 0.074917 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表