Code: Select all
#NoEnv
#singleinstance force
timerm := "00"
timers := "00"
stopped := "0"
Gui, Font, s15 cWhite
Gui, Add, Text,x60 y20 w60 h20 vTText, %timerm%:%timers%
Gui, Add, Button,x4 y42 w80 h20 vPause, Pause
Gui, Color, White
Gui, Add, Button,x85 y42 w80 h20 vReset, Reset
F3::
Toggle := !toggle
If toggle
Gui, Show,x0 y0 h60 w165, Stopwatch
Gui, Color, Black
if else
Gui, hide
Settimer, Stopwatch, 1000
Return
Stopwatch:
timers += 1
if(timers > 59)
{
timerm += 1
timers := "0"
GuiControl, , TText , %timerm%:%timers%
}
if(timers < 10)
{
GuiControl, , TText , %timerm%:0%timers%
}
else
{
GuiControl, , TText , %timerm%:%timers%
}
return
ButtonPause:
if(stopped = 0)
{
Settimer, Stopwatch, off
stopped = 1
}
else
{
Settimer, Stopwatch, 999
stopped = 0
}
return
ButtonReset:
timerm := "00"
timers := "00"
GuiControl, , TText , %timerm%:%timers%
return
GuiClose:
GuiEscape:
Gui, Hide
return
F1::
Loop,
{
MouseClick, left, 242, 607
Sleep 500
MouseClick, left, 612, 452
Sleep 500
MouseClick, left, 362, 353
Sleep 500
MouseClick, left, 1251, 954
}
F2::
pause
ins::
Msgbox, Start/Stop script - F1/F2, Timer - F3, Show Controls - Ins, Exitapp - END
return
END::
Exitapp