I've been trying to wrap my brain around how I could set the timer the the time I want with buttons. Can anyone help me?
Thanks in advance!
AutoIt
#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $teamOneScore = 0 $teamTwoScore = 0 $Team1Score = GUICtrlCreateLabel($teamOneScore, 160, 56, 98, 146, BitOR($SS_CENTER, $SS_CENTERIMAGE)) $Team2Score = GUICtrlCreateLabel($teamTwoScore, 664, 56, 152, 146, BitOR($SS_CENTER, $SS_CENTERIMAGE)) $ComboTeam2 = GUICtrlCreateCombo("Couleur", 872, 40, 65, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) ;~ $Graphic1 = GUICtrlCreateGraphic( 352, 72, 247, 115) ;~ GUICtrlSetBkColor($Graphic1, 0x0033CC) While 1 Switch $nMsg Case $BtnStart _Run() Case $ComboTeam1 $sComboRead = "" Case $ComboTeam2 $sComboRead = "" Case $BtnAdd60 $_CompteArebour = $_CompteArebour + 100000 Case $BtnAdd30 $_CompteArebour = $_CompteArebour + 30000 Case $BtnAdd10 $_CompteArebour = $_CompteArebour + 10000 Case $BtnAdd5 $_CompteArebour = $_CompteArebour + 5000 Case $BtnReset ;~ $_CompteArebour = 0 Case $AboutMenuItem Case $PPT1 $teamOneScore = $teamOneScore + 1 $Team1Score = GUICtrlCreateLabel($teamOneScore, 160, 56, 98, 146, BitOR($SS_CENTER, $SS_CENTERIMAGE)) Case $MPT1 $teamOneScore = $teamOneScore - 1 $Team1Score = GUICtrlCreateLabel($teamOneScore, 160, 56, 98, 146, BitOR($SS_CENTER, $SS_CENTERIMAGE)) Case $GUI_EVENT_CLOSE While 1 _Check() EndFunc ;==>_Run Switch $nMsg Case $GUI_EVENT_CLOSE Case $BtnStart _Run() Case $BtnPause Case $BtnReset ;~ $_CompteArebour = 0 Case $BtnAdd60 $_CompteArebour = $_CompteArebour + 60000 Case $BtnAdd30 $_CompteArebour = $_CompteArebour + 30000 Case $BtnAdd10 $_CompteArebour = $_CompteArebour + 10000 Case $BtnAdd5 $_CompteArebour = $_CompteArebour + 5000 ; If @Compiled Then Shutdown ( 13 ) $_Minutes = $_MinCalc $_Seconds = $_SecCalc EndFunc ;==>_Check