Code : Tout sélectionner
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Timing", 281, 172, 192, 124)
Global $Label1 = GUICtrlCreateLabel("Il Reste ", 24, 48, 43, 17)
Global $seconde = GUICtrlCreateLabel("", 72, 48, 43, 17)
Global $Label2 = GUICtrlCreateLabel("Sec Avant la fermeture", 104, 48, 112, 17)
Global $Button1 = GUICtrlCreateButton("Button1", 176, 120, 75, 25)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
$time = 60
AdlibRegister("decompte", 1000)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func decompte()
GUICtrlSetData($seconde, $time)
$time = $time - 1
EndFunc ;==>decompte