#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("CTRL + Q 本次循环结束后退出", 330, 260, -1, -1)
$Label1 = GUICtrlCreateLabel("9", 1, 1, 120, 240)
GUICtrlSetFont(-1, 200, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
dim $t = 0
HotKeySet("^q", "quit") ;;CTRL + Q 本次循环结束后退出
$s = 9
GUISetOnEvent($GUI_EVENT_CLOSE, "quitt")
Opt("GUIOnEventMode", 1)
While 1
sleep(1000)
GUICtrlSetData($Label1,$s - 1)
$s = $s - 1
if $s = 0 then
if $t = 1 then quitt()
$s = 10
endif
WEnd
func quit()
$t = 1
endfunc
func quitt()
exit
endfunc
|