scrappy53 Posted August 17, 2014 Share Posted August 17, 2014 (edited) Edited September 4, 2014 by scrappy53 Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted August 17, 2014 Share Posted August 17, 2014 (edited) http://www.autoitscript.com/forum/topic/128086-countdown-timer-with-the-option-to-add-time/?p=888675 konuyu inceleyin Edited August 17, 2014 by mesale0077 Quote Link to comment Share on other sites More sharing options...
scrappy53 Posted August 18, 2014 Author Share Posted August 18, 2014 (edited) Edited September 4, 2014 by scrappy53 Quote Link to comment Share on other sites More sharing options...
mesale0077 Posted August 18, 2014 Share Posted August 18, 2014 kodları dikkatlice incelerseniz bu sonuç çıkıyor #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $hGUI = GUICreate("Geri sayım aracı", 351, 151, 192, 125) $label = GUICtrlCreateLabel("00:00:00", 30, 62, 260, 80) GUICtrlSetFont(-1, 50, 400) $button = GUICtrlCreateButton("Güncelle", 295, 120, 50, 25) $Input1 = GUICtrlCreateInput("00", 104, 16, 33, 21) $Input2 = GUICtrlCreateInput("01", 224, 16, 41, 21) $Label1 = GUICtrlCreateLabel("Saat", 64, 16, 26, 17) $Label2 = GUICtrlCreateLabel("Dakika", 176, 16, 38, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $button Global $seconds = GUICtrlRead($Input1)*3600+GUICtrlRead($Input2) * 60 ;convert to seconds Countdown() AdlibRegister("Countdown", 1000) EndSwitch WEnd AdlibUnRegister("Countdown") GUIDelete($hGUI) Exit Func Countdown() Local $sec, $min, $hr $sec = Mod($seconds, 60) $min = Mod($seconds / 60, 60) $hr = Floor($seconds / 60 ^ 2) GUICtrlSetData($label, StringFormat("%02i:%02i:%02i", $hr, $min, $sec)) If $seconds <= 0 Then AdlibUnRegister("Countdown") MsgBox(0, "Bilgi", "Süre bitti 00:00:00") Exit EndIf $seconds -= 1 EndFunc Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.