找回密码
 加入
搜索
查看: 1757|回复: 2

如何使鼠标点击时倒计时就停止?

[复制链接]
发表于 2008-6-28 08:34:05 | 显示全部楼层 |阅读模式
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$AForm1 = GUICreate("AForm1", 398, 281, -1, -1)
$Progress1 = GUICtrlCreateProgress(56, 176, 265, 17)
GUICtrlSetResizing(-1, $GUI_DOCKAUTO)
$Button1 = GUICtrlCreateButton("执行", 64, 232, 89, 33, 0)
$Button2 = GUICtrlCreateButton("退出", 208, 232, 89, 33, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$time=10
AdlibEnable("djs", 10 * $time)
$wait = 0
While 1
        $nMsg = GUIGetMsg()
Select 
Case $nMsg=$Button1
                MsgBox(0,"提示","你点了执行",10)
                mr()
exitloop
Case $nMsg=$Button2
                MsgBox(0,"提示","你点了退出",10)
                mr()
exitloop
Case $nMsg=$GUI_EVENT_CLOSE
            mr()
        EndSelect
WEnd
;倒计时
Func djs()
        GUICtrlSetData($Progress1, $wait)
        $wait = $wait + 1
        If $wait = 101 Then mr()
EndFunc

Func mr()
        Exit
EndFunc


[ 本帖最后由 qq342252004 于 2008-6-28 12:45 编辑 ]
 楼主| 发表于 2008-6-28 12:45:07 | 显示全部楼层
因为不能对一个贴重复评分,所以只能给你+5分了。
真是太谢谢你了
发表于 2010-12-30 09:38:17 | 显示全部楼层
不错,有一点用
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-10-2 18:29 , Processed in 0.096256 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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