if A or B button is clicked, it will show timer and decreased value Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
kentpachi
Posts: 152
Joined: 15 May 2016, 01:23

if A or B button is clicked, it will show timer and decreased value

Post by kentpachi » 24 Jan 2024, 11:23

Good day AHKers,


Image


so in a GUI

there is a A and B button
if A button is clicked, it will show 30 seconds and it countdown and the digit display is shown and decrease

if B button is clicked, it will show 30 seconds and it countdown and the digit display is shown and decrease

vsub
Posts: 541
Joined: 29 Sep 2015, 03:39

Re: if A or B button is clicked, it will show timer and decreased value  Topic is solved

Post by vsub » 24 Jan 2024, 11:39

I am not sure what the goal is but here is a quick example

Code: Select all

Gui, Add, Button, x12 y129 w100 h30 , A
Gui, Add, Button, x122 y129 w100 h30 , B
Gui, Add, Text, x42 y59 w110 h20 +Center,
Gui, Show, x127 y87 h191 w255, New GUI Window
Return

ButtonA:
Time = 31
ButtonB:
Time = 31 ; change this if you actually wanted something else or just remove this line if you want both buttons to do the same thing
Loop,% Time
{
GuiControl,,Static1,% Time - A_Index
Sleep,1000
}
Return


GuiClose:
ExitApp

Post Reply

Return to “Ask for Help (v1)”