Guest User

Untitled

a guest
Jul 15th, 2018
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. #NoEnv
  2. SendMode Input
  3.  
  4. ~Space:: ;Use the space key to quickly toggle the script on & off
  5. Hotkey, ~LButton, toggle
  6. If toggle != 1
  7. {
  8. toggle := 1 ; Will beep if it is set to on
  9. SoundPlay *64 ;Good because it plays over primary speakers. Others tend to play on motherboard speakers. It's 2008 many computers no longer have motherboard speakers!
  10. }
  11. else
  12. {
  13. toggle := 0 ; Will beep if it is set to off
  14. SoundPlay *64 ;Good because it plays over primary speakers. Others tend to play on motherboard speakers. It's 2008 many computers no longer have motherboard speakers!
  15. }
  16.  
  17. _auto := true
  18.  
  19. ~LButton::autofire()
  20. ~^LButton::autofire()
  21. Code:
  22.  
  23.  
  24. \::suspend ;/ key completely suspends the script
  25. autofire()
  26. {
  27. global _auto
  28. if _auto
  29. {
  30. {
  31. Loop
  32. {
  33. if GetKeyState("LButton", "P")
  34. {
  35. Test1 := A_Index ;Test1 = A variable that carries outside of the loop, A_Index = how many times this specific loop has run.
  36. SendInput {LButton DownTemp}
  37. Sleep, 148 ;Time to wait in MS
  38. SendInput {LButton Up}
  39. Sleep, 148 ;Time to wait in MS
  40. }
  41. else
  42. break
  43. }
  44. } ;; loop
  45. } ;; if
  46. } ;; autofire()
  47.  
  48. mouseXY(x,y)
  49. {
  50. DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
  51. }
  52. return
  53. ;;;;;;
  54. ;;; End script
Add Comment
Please, Sign In to add comment