Code : Tout sélectionner
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
#include <GuiRichEdit.au3>
#include <GUIConstantsEx.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 1047, 829, 130, 34)
GUISetCursor (15)
$Txt1 = GUICtrlCreateLabel("Veuillez patienter...", 384, 288, 326, 49)
GUICtrlSetFont(-1, 25, 800, 0, "Comic Sans MS")
GUICtrlSetCursor (-1, 1)
$Input = GUICtrlCreateInput("Input", 504, 352, 49, 23, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
GUICtrlSetFont(-1, 10, 400, 0, "DejaVu Sans Condensed")
GUICtrlSetCursor (-1, 1)
GUISetState(@SW_SHOW)
$ms = 100000
$timer = TimerInit()
traysetstate(2)
While (TimerDiff($timer) < $ms)
$seconds = TimerDiff($timer)/1000
$diff = $seconds - ($ms/1000)
$minutes = Int($diff / 60)
$secondsRem = $diff - ($minutes * 60)
$minutes = $minutes * -1
$secondsRem = $secondsRem * -1
$time = StringFormat("%02d", $minutes) & ":" & StringFormat("%02d", $secondsRem)
GUICtrlSetData($Input, $time)
WEnd
If(TimerDiff($timer) > $ms) then
Exit
Endif