Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- testing = 1
- TimeWhenCanRepeat = 0
- $4::
- {
- if (testing = 1 ) { ; Just as a test
- KeyWait, 4, T0.5
- if ErrorLevel { ; If you held it for <Default: 0.5> seconds, do..
- if (TimeWhenCanRepeat = 0) {
- DoThingAndSetTimer()
- }
- else if (A_TickCount >= TimeWhenCanRepeat) {
- DoThingAndSetTimer()
- }
- }
- }
- }
- DoThingAndSetTimer() {
- // Do thing
- TimeWhenCanRepeat := A_TickCount + 10000; current time + some time in the future, in ms
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement