#NoTrayIcon
#include <WindowsConstants.au3>
HotKeySet('{esc}', 'exitau3')
GUICreate("", 178, 108, 400, 268, BitOR($DS_MODALFRAME, $WS_POPUPWINDOW))
$time = GUICtrlCreateLabel("00:59:50 ", 24, 12, 240, 40)
GUICtrlSetFont(-1, 50, 400, 0, "MS Sans Serif")
$timer = GUICtrlCreateLabel("01:00:10 ", 24, 56, 210, 40)
GUICtrlSetFont(-1, 50, 400, 0, "MS Sans Serif")
AdlibRegister('timer')
GUISetState(@SW_SHOW)
While 1
Sleep(100)
WEnd
Func exitau3()
AdlibUnRegister('timer')
Exit
EndFunc ;==>exitau3
Func timer()
While 1
$k = Number(StringLeft(GUICtrlRead($time), 2))
$i = Number(StringMid(GUICtrlRead($time), 4, 2))
$j = Number(StringRight(StringTrimRight(GUICtrlRead($time), 1), 2))
$l = Number(StringLeft(GUICtrlRead($timer), 2))
$m = Number(StringMid(GUICtrlRead($timer), 4, 2))
$n = Number(StringRight(StringTrimRight(GUICtrlRead($timer), 1), 2))
; 计时
If $j <> 59 Then
$j += 1
Else
$j = 0
If $i < 59 Then
$i += 1
Else
$i = 0
If $k < 23 Then
$k += 1
Else
$k = 0
EndIf
EndIf
EndIf
;倒计时
If $n > 0 Then
$n -= 1
Else
$n = 59
If $m <> 0 Then
$m -= 1
Else
$m = 59
If $l <> 0 Then
$l -= 1
Else
$l = 23
EndIf
EndIf
EndIf
GUICtrlSetData($time, StringFormat("%02d:%02d:%02d\n", $k, $i, $j))
GUICtrlSetData($timer, StringFormat("%02d:%02d:%02d\n", $l, $m, $n))
Sleep(1000)
WEnd
EndFunc ;==>timer