'Countdown Timer Big' but for minutes

Discussion, questions and support.
Post Reply
User avatar
Oblomov
Posts: 184
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Jun 23rd, ’21, 11:03

Hello,

I wanted to change 'Countdown Timer Big' to minutes only, where I changed 'secsLeft' to 'minLeft':

Code: Select all

if WinExist("MyCountdown") {
 Gui, 19:Destroy
 SetTimer, ShowTimerCD, Off
}
else {

InputBox, minLeft , Countdown, Countdown Minutes:,,160,123,,,,15
If ErrorLevel
 Return
Gui 19:+LastFound +AlwaysOnTop -Caption +ToolWindow
Gui 19:Color, EEAA99
Gui 19:Font, s228
Gui 19:Margin, 0, 0
Gui 19:Add, Text, w335 h290 yp-50 Vdisp Cred Right
WinSet TransColor, EEAA99
Gui 19:Show, NoActivate, MyCountdown

SetTimer, ShowTimerCD, 1000
Gosub ShowTimerCD
Return
}

ShowTimerCD:
minLeft--
IfEqual, minLeft, 0
{
  Loop 4
  {
  GuiControl, 19:Text, disp, 0
  Sleep 400  
  GuiControl, 19:Text, disp,
  Sleep 400
  }
  SetTimer ShowTimerCD, Off
  ;Sleep 3000
  Gui, 19:Destroy
}
Else
  GuiControl, 19:Text, disp, %minLeft%
Return
But when I enter '1' into the input field now, I only get some red numbers flashing by 😞
Perhaps someone could point me in the right direction?
User avatar
Tom
Posts: 791
Joined: Nov 24th, ’15, 23:39

Post by Tom » Jun 24th, ’21, 11:11

The original script changes the count each second using a timer. The only thing you would need is to change the time from one second to 60 seconds:

Code: Select all

SetTimer, ShowTimerCD, 60000
User avatar
Oblomov
Posts: 184
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Jun 24th, ’21, 11:58

Tom wrote: Jun 24th, ’21, 11:11 The original script changes the count each second using a timer. The only thing you would need is to change the time from one second to 60 seconds:

Code: Select all

SetTimer, ShowTimerCD, 60000
Awesome, thanks!
Post Reply