Advertisement
Guest User

Untitled

a guest
Jun 21st, 2019
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. testing = 1
  2. TimeWhenCanRepeat = 0
  3.  
  4. $4::
  5. {
  6. if (testing = 1 ) { ; Just as a test
  7. KeyWait, 4, T0.5
  8. if ErrorLevel { ; If you held it for <Default: 0.5> seconds, do..
  9. if (TimeWhenCanRepeat = 0) {
  10. DoThingAndSetTimer()
  11. }
  12. else if (A_TickCount >= TimeWhenCanRepeat) {
  13. DoThingAndSetTimer()
  14. }
  15. }
  16. }
  17. }
  18.  
  19. DoThingAndSetTimer() {
  20. // Do thing
  21. TimeWhenCanRepeat := A_TickCount + 10000; current time + some time in the future, in ms
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement