kn007
发表于 2009-9-8 23:42:18
我下了,各位早点哦
afan
发表于 2009-9-8 23:44:01
31# kn007
早点..........
kn007
发表于 2009-9-8 23:46:25
嘿嘿,你也是 ,88
afan
发表于 2009-9-9 00:14:05
本帖最后由 afan 于 2009-9-9 00:15 编辑
#include <GUIConstantsEx.au3>
Dim $timez = 20, $time = $timez
$Form1 = GUICreate("倒计时测试窗口", 350, 172, 193, 125)
$Label1 = GUICtrlCreateLabel($time & "秒后将安装拖拉机,请选择!", 20, 32, 310, 28, 0x0002)
GUICtrlSetFont(-1, 16, 400, 0, "楷体_GB2312")
$Progress1 = GUICtrlCreateProgress(8, 88, 333, 17)
$Button1 = GUICtrlCreateButton("立即安装(&Y)", 53, 128, 90, 25)
$Button2 = GUICtrlCreateButton("退出安装(&X)", 210, 128, 90, 25)
GUISetState()
AdlibEnable("_timer", 1000)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE, $Button2
Exit
Case $Button1
ExitLoop
EndSwitch
If $time <= 0 Then ExitLoop (Sleep(1000))
WEnd
main()
Exit
Func _timer()
$time -= 1
GUICtrlSetData($Label1, $time & "秒后将安装拖拉机,请选择!")
GUICtrlSetData($Progress1, ($timez - $time) / $timez * 100)
If $time <= 0 Then Return (GUICtrlSetData($Label1, "现在开始安装拖拉机 ")) & (AdlibDisable())
EndFunc ;==>_timer
Func main()
run("C:\拖拉机\拖拉机.EXE")
EndFunc ;==>main修改得人性化了点,另外倒计时时间只需修改前面的 Dim $timez = 20 ,20秒改成其它值即可,其余处均不用调整。
fyhwaijxnt78
发表于 2009-9-9 10:54:51
#include
Dim $timez = 20, $time = $timez
$Form1 = GUICreate("倒计时测试窗口", 350, 172, 193, 125)
$Label1 = GUICtrlCreateLabel($time & "秒后将安装拖拉机,请选择!", 20, 32, 310, 28, 0x0002)
GUI ...
afan 发表于 2009-9-9 00:14 http://www.autoitx.com/images/common/back.gif
谢谢,很好!
我自己已改成二行了!
qiaojoly
发表于 2010-12-30 09:51:55
我来试一下看
dnvplj
发表于 2015-3-11 14:04:25
回复 34# afan
版主您好:
该代码一运行就出错呢,请指教。
zcx880517
发表于 2015-3-11 15:54:35
回复 37# dnvplj
AdlibRegister
AdlibUnRegister
dnvplj
发表于 2015-3-11 16:11:43
本帖最后由 dnvplj 于 2015-3-11 16:19 编辑
回复 38# zcx880517
感谢回复,明白了。