Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;needs the target program to be Borderless or Windowed
- ;disable Aero in case of issues
- #NoEnv
- #MaxHotkeysPerInterval 99000000
- #HotkeyInterval 99000000
- #KeyHistory 0
- ListLines Off
- Process, Priority, , A
- SetBatchLines, -1
- SetKeyDelay, -1, -1
- SetMouseDelay, -1
- SetDefaultMouseSpeed, 0
- SetWinDelay, -1
- SetControlDelay, -1
- SendMode Input
- ::
- loop
- {
- DllCall("Sleep","UInt",1) ;increase sleep time in case of excessive CPU load
- PixelSearch,,,1116,1031,1117,1032,0xB30202,RGB ;read PixelSearch's documentation on how to add more color tolerance if you need it
- If ErrorLevel = 1
- {
- Send G
- DllCall("Sleep","UInt",34)
- Send G
- DllCall("Sleep","UInt",34)
- }
- }
- return
- $*Ins::
- Suspend, permit
- if (State = 0)
- {
- SoundBeep, 10000, 250
- State++
- Pause,,1
- }
- Else
- {
- State := 0
- SoundBeep, 250, 250
- Pause,,1
- }
- Suspend, Toggle
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement