Advertisement
Guest User

Untitled

a guest
Jun 12th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. global c = 0
  2.  
  3. $WheelDown::            ; Down/Sleep/Up usage.
  4. key := DownSeqkeys("F2","F3","F4","F5")
  5. send {%key% Down}
  6. sleep, 20
  7. send {%key% Up}
  8. return
  9.  
  10. $WheelUp::            ; Down/Sleep/Up usage.
  11. key := UpSeqkeys("F2","F3","F4","F5")
  12. send {%key% Down}
  13. sleep, 20
  14. send {%key% Up}
  15. return
  16.  
  17.  
  18. UpSeqkeys(k1,k2,k3,k4){   ; 4 keys rotation, 8 second reset.
  19.     static s:=0, t:=8000
  20.     (A_TickCount-s<=t && c>1) ? c-=1 : c:=4, s:=A_TickCount
  21.     Return k%c%
  22. }
  23. DownSeqkeys(k1,k2,k3,k4){   ; 4 keys rotation, 8 second reset.
  24.     static s:=0, t:=8000
  25.     (A_TickCount-s<=t && c<4) ? c+=1 : c:=1, s:=A_TickCount
  26.     Return k%c%
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement