My Attempt using Loop inside the loop..
Works BUT The problem here is i can't interrupt the loop in order to edit the timer while it's running.
Code: Select all
Gui,add,edit,vx8
Gui, Add, Text,, Set Timer
Gui, Add, Button, w60, Set-t
Gui, Add, Edit, x+n w50
Gui, Add, UpDown, vtime Range1-90, 60
gui,show
return
Buttonset-t:
{
Gui, Submit,nohide
Time1 := time
Loop,%Time1%
{
Time1 := (time1 - 1)
Time2 = 60
Loop, 60
{
time2 := (Time2 - 1)
Guicontrol, text,x8,%time1% : %time2%
sleep 100
}
}
}
My attempt with Settimer..
Dosent Work The problem I'm running into here is i need the timer to stop at 0 but it instead goes into negative numbers.
I tried using "settimer,z1, off" but that didn't seem to work as it won't turn back on.
Code: Select all
Gui,add,edit,vx8
Gui, Add, Text,, Set Timer
Gui, Add, Button, w60, Set-t
Gui, Add, Edit, x+n w50
Gui, Add, UpDown, vtime Range1-90, 60
gui,show
return
Buttonset-t:
{
Gui, Submit,nohide
Time1 := time
Loop,%Time1%
{
Time1 := (time1 - 1)
Time2 = 60
Settimer, z1, on
z1:
{
time2 := (Time2 - 1)
Guicontrol, text,x8,%time1% : %time2%
If (time2 = 0)
{
Settimer, z1,off
}
}
return
}
}