回复内容会自动替换代码,所以单独发文章参与活动;
觉得这个活动创意非常好!
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Persistent ;保持后台运行
#SingleInstance FORCE ;单实例运行模式
SetBatchLines -1
Gui, +LastFound +ToolWindow +AlwaysOnTop
Gui, Color, EAEAEA,2b2b2b
gui,margin,10,10
GUI, Font, w200 Q5 s25 bold c2b2b2b , Microsoft Yahei
GUI, ADD,TEXT, W200 CENTER vtime1, % "01:00:00"
GUI, Font, s12 norm
GUI, ADD, BUTTON, Y+30 W200 default gstart, 开始
GUI, ADD, BUTTON, Y+10 W200 default gcancleme, 重置
gui,show,autosize center, 倒计时测试
guicontrol, disable, button2
return
start:
guicontrol, disable, button1
guicontrol, enable, button2
settimer, start, 1000
ControlGetText, temptime, static1, 倒计时测试
StringReplace, temptime, % temptime, % ":" , % "", all
FormatTime, nowtime, ,yyyyMMdd
nowtime:=nowtime . temptime
envadd, nowtime, -1, seconds
formattime, temptime, %nowtime% , HH:mm:ss
ControlSetText, static1,% temptime,倒计时测试
if (temptime="00:00:00")
{
settimer, start, off
msgbox, 倒计时结束
ControlSetText, static1,% "01:00:00",倒计时测试
}
return
cancleme:
ControlSetText, static1,% "01:00:00",倒计时测试
guicontrol, enable, button1
guicontrol, disable, button2
settimer, start, off
return