Advertisement
Jusuu

Untitled

Jun 17th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. ;needs the target program to be Borderless or Windowed
  2. ;disable Aero in case of issues
  3. #NoEnv
  4. #MaxHotkeysPerInterval 99000000
  5. #HotkeyInterval 99000000
  6. #KeyHistory 0
  7. ListLines Off
  8. Process, Priority, , A
  9. SetBatchLines, -1
  10. SetKeyDelay, -1, -1
  11. SetMouseDelay, -1
  12. SetDefaultMouseSpeed, 0
  13. SetWinDelay, -1
  14. SetControlDelay, -1
  15. SendMode Input
  16.  
  17.  
  18. ::
  19. loop
  20. {
  21. DllCall("Sleep","UInt",1) ;increase sleep time in case of excessive CPU load
  22. PixelSearch,,,1116,1031,1117,1032,0xB30202,RGB ;read PixelSearch's documentation on how to add more color tolerance if you need it
  23. If ErrorLevel = 1
  24. {
  25. Send G
  26. DllCall("Sleep","UInt",34)
  27. Send G
  28. DllCall("Sleep","UInt",34)
  29. }
  30. }
  31. return
  32.  
  33. $*Ins::
  34. Suspend, permit
  35. if (State = 0)
  36. {
  37. SoundBeep, 10000, 250
  38. State++
  39. Pause,,1
  40. }
  41. Else
  42. {
  43. State := 0
  44. SoundBeep, 250, 250
  45. Pause,,1
  46. }
  47. Suspend, Toggle
  48. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement