An example :
#include <WindowsConstants.au3>
Global $SS_CENTER, $_CompteArebour = 60000, $_Minutes, $_Seconds
$_GuiCountDown = GUICreate ( "CountDown...", 500, 200, @DesktopWidth/2 -250, @DesktopHeight/2 -100, $WS_EX_TOPMOST )
GUISetBkColor ( 0xFFFF00 )
$TimeLabel = GUICtrlCreateLabel ( "", 35, -10, 480, 180, $SS_CENTER )
GUICtrlSetFont ( -1, 125, 800 )
GUISetState ( )
WinSetOnTop ( $_GuiCountDown, "", 1 )
$TimeTicks = TimerInit ( )
While 1
_Check ( )
Sleep ( 200 )
WEnd
Func _Check ( )
$_CompteArebour -= TimerDiff ( $TimeTicks )
$TimeTicks = TimerInit ( )
Local $_MinCalc = Int ( $_CompteArebour / ( 60 * 1000 ) ), $_SecCalc = $_CompteArebour - ( $_MinCalc * 60 * 1000 )
$_SecCalc = Int ( $_SecCalc / 1000 )
If $_MinCalc <= 0 And $_SecCalc <= 0 Then
GUISetBkColor ( 0xFF0000, $_GuiCountDown )
GUICtrlSetData ( $TimeLabel, "Bye !" )
Sleep ( 1000 )
; If @Compiled Then Shutdown ( 13 )
Exit
Else
If $_MinCalc <> $_Minutes Or $_SecCalc <> $_Seconds Then
$_Minutes = $_MinCalc
$_Seconds = $_SecCalc
GUICtrlSetData ( $TimeLabel, StringFormat ( "%02u" & ":" & "%02u", $_Minutes, $_Seconds ) )
If $_Minutes = 0 And $_Seconds <= 10 Then
Beep ( 1200, 100 )
GUISetBkColor ( 0xA093FF, $_GuiCountDown )
EndIf
EndIf
EndIf
EndFunc ;==> _Check ( )