Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv
- SendMode Input
- _auto := true ;Toggle for the anti-recoil being on or off. default is on
- ~LButton::autofire() ; When the LButton is pressed run the autofire() function
- !LButton::_auto := ! _auto ;Alt + LButton used to toggle the anti-recoil on and off
- F1::ExitApp ; F1 used to exit the ahk script file
- ; autofire() function, name is misleading could easily be antiRecoil()
- autofire()
- {
- global _auto
- if _auto ; if _auto == true. i.e. is anti-recoil on?
- { ; anti-recoil on? If yes do this
- Loop ; Continuously loop until a 'break' command
- {
- if GetKeyState("LButton", "P") ; If LButton is pressed
- { ; LButton pressed? If yes do this
- Sleep 75 ; sleep for 85 milliseconds
- mouseXY(0, 70) ;Call the mouseXY() function which moves the mouse the specified distance. mouseXY( X, Y,)
- Sleep 45 ; sleep for 45milliseconds
- }
- else ;LButton pressed? If no do this, i.e. exit the loop
- break ;will stop the loop
- } ;; loop
- } ;; if
- } ;; autofire() ; anti-recoil on? If no do nothing
- mouseXY(x,y)
- {
- DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0) ; moves the mouse could easily be the built in autohotkey MouseMove, X, Y
- }
Advertisement
Advertisement