Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #UseHook
- #NoEnv
- #singleinstance force
- Process, Priority, , R
- timer := "0"
- stopped := "1"
- Gui, Add, Text, x67 y22 w60 h20 vTText, %timer%0
- Gui, Add, Button, x2 y42 w80 h20 vPause, Start/Stop
- Gui, Add, Button, x82 y42 w80 h20 vReset, Reset
- Gui, Show, h69 w165, Stopwatch
- Settimer, Stopwatch, off
- Return
- ButtonStart/Stop:
- if(stopped = 0)
- {
- Settimer, Stopwatch, off
- stopped = 1
- Return
- }
- Settimer, Stopwatch, 10 ;←10ミリ秒ごとに繰り返し?
- stopped = 0
- Return
- Stopwatch:
- timer += 1
- if(timer > 999)
- timer := "0"
- GuiControl, , TText , %timer%0
- Return
- ButtonReset:
- timer := "0"
- GuiControl, , TText , %timer%0
- Return
- GuiClose:
- GuiEscape:
- ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement