Code: Select all
~4::{
static TimerOne := 0
if(GetKeyState("4","P") and TimerOne = 0)
{
SetTimer Timer1, 1000
Timer1
MsgBox "Timer1 set"
}
if (GetKeyState("4","P") and TimerOne = 1)
{
MsgBox "Already Set"
}
}
Timer1() {
TimerOne:= 1
static Start_Counter1 := 0
if (Start_Counter1 < 15)
{
Start_Counter1++
ToolTip Start_Counter1
SoundBeep 1200
If Start_Counter1 = 30 {
Start_Counter1 := 0 ;
SetTimer Timer1, 0
TimerOne := 0
MsgBox "Timer1 ends"
}
}
}