找回密码
 加入
搜索
查看: 1907|回复: 7

AU3加载进度的显示问题

[复制链接]
发表于 2009-6-29 21:53:44 | 显示全部楼层 |阅读模式
本帖最后由 szp123 于 2009-6-30 10:23 编辑

想问一下如何实现下面的效果,应该恨简单的吧

加载中.
加载中..
加载中...

也就是一直显示加载中,然后那个点从1个变为2个接着变成3个,依此类推,到6个后又变为1个。

呵呵,请大家教教我,谢谢
发表于 2009-6-30 00:12:49 | 显示全部楼层
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("测试", 133, 65, 192, 124)
$Label1 = GUICtrlCreateLabel("加载中......", 40, 16, 90, 17)
GUISetState(@SW_SHOW)

While 1
        $SS="加载中."
        $i=1
        While 1
                $SS=$SS&"."
                $i=$i+1
                If $i=6 Then
                        $SS="加载中."
                        $i=1
                EndIf
                GUICtrlSetData($Label1,$SS)
                Sleep(500)
        WEnd
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd
 楼主| 发表于 2009-6-30 10:19:24 | 显示全部楼层
羡慕,果然是高手。。
谢谢了。
发表于 2009-7-1 08:20:38 | 显示全部楼层
2# jhun

又是一个死循环。
发表于 2009-7-1 12:42:25 | 显示全部楼层
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("测试", 133, 65, 192, 124)
$Label1 = GUICtrlCreateLabel("加载中", 40, 16, 90, 17)
GUISetState(@SW_SHOW)
$SS = "."
AdlibRegister("_conut" ,1000)
While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd

Func _conut()
        $SS = $SS & "."
        If StringLen($SS) > 6 Then $SS = "."
        GUICtrlSetData($Label1, "加载中" & $SS)
EndFunc
发表于 2009-7-1 12:48:33 | 显示全部楼层
2# jhun

又是一个死循环。
即即 发表于 2009-7-1 08:20

这样处理一下就可以退出了
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
 
$Form1 = GUICreate("测试", 133, 65, 192, 124)
$Label1 = GUICtrlCreateLabel("加载中", 40, 16, 90, 17)
GUISetState(@SW_SHOW)
 
While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case Else
        $SS="加载中."
                $i=1
        $T = 0
                while 1
                        if timerdiff($T) > 3000 then
                              $T = timerinit()
                      $SS=$SS&"."
                              $i=$i+1
                              If $i=5 Then
                              $SS="加载中."
                              $i=1
                      EndIf
                   GUICtrlSetData($Label1,$SS)
                           endif
                               if guigetmsg() = -3 then exit
               WEnd
        EndSwitch
WEnd
发表于 2009-7-14 20:12:49 | 显示全部楼层
AdlibRegister("_conut" ,1000 )


AdlibRegister是什么?
 楼主| 发表于 2009-8-3 11:23:35 | 显示全部楼层
6# autoit3CN
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-4 04:04 , Processed in 0.077995 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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