Guest User

Untitled

a guest
Dec 11th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. #SingleInstance
  2. gActivateScript = 0
  3.  
  4. ; Insert to activate the macro
  5. ~Insert::
  6. KeyWait, Insert
  7. GetKeyState, InsertState, Insert, T
  8. If InsertState = D
  9. {
  10. gActivateScript = 1
  11.  
  12. }
  13. else
  14. {
  15. gActivateScript = 0
  16.  
  17. }
  18. return
  19.  
  20. ; CTRL + SHIFT + LBUTTON to activate the macro
  21. ~+^LButton::
  22. If gActivateScript = 0
  23. {
  24. gActivateScript = 1
  25.  
  26. }
  27. else
  28. {
  29. gActivateScript = 0
  30.  
  31. }
  32. return
  33.  
  34. ;Also applies to burst weapons. ie click and hold will perform like a full auto firing mode
  35. ~LButton::
  36. Goto, DoFiringLoop
  37. Return
  38.  
  39. ;When crouching and firing at the same time. Using Ctrl as crouch button
  40. ~^LButton::
  41. Goto, DoFiringLoop
  42. Return
  43.  
  44. DoFiringLoop:
  45. if gActivateScript = 1
  46. {
  47. Loop
  48. {
  49. ;Set you game here.
  50. IfWinActive, APB Reloaded
  51. {
  52. MouseClick, left,,, 1, 0, D
  53. ;delay between simu. mouse btn down and up
  54. Sleep, 0
  55. MouseClick, left,,, 1, 0, U
  56. GetKeyState, LButtonState, LButton, P
  57. If LButtonState = U
  58. {
  59. ;break the loop if physical state of mouse btn is up.
  60. break
  61. }
  62. ;delay between each simu. click events
  63. Sleep, 0
  64. }
  65. else
  66. {
  67. break
  68. }
  69. }
  70.  
  71. }
  72. exit
  73.  
  74. return
Add Comment
Please, Sign In to add comment