Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. ; #Warn ; Enable warnings to assist with detecting common errors.
  3. SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
  4. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
  5.  
  6.  
  7. _auto := true
  8.  
  9. ~LButton::autofire()
  10. Numlock::_auto := ! _auto
  11. F1::ExitApp
  12.  
  13. autofire()
  14. {
  15. global _auto
  16. if _auto
  17. {
  18. Loop
  19. {
  20. if GetKeyState("LButton", "P")
  21. {
  22. SendInput {LButton DownTemp}
  23. Sleep 25
  24. mouseXY(0, 1)
  25. SendInput {LButton Up}
  26. Sleep 25
  27. }
  28. else
  29. break
  30. } ;; loop
  31. } ;; if
  32. } ;; autofire()
  33.  
  34. mouseXY(x,y)
  35. {
  36. DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement