Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- ; #Warn ; Enable warnings to assist with detecting common errors.
- SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
- #SingleInstance force
- drop = 35
- MsgBox, Thank you for using InVains NoRecoil Hotkey! Be sure to donate to the cause!\
- MsgBox, Ctrl + Escape will terminate the script -- Ctrl + F1 will toggle the script
- ^Escape:: ;Terminate script
- ExitApp
- return ;--
- ^f1:: ;Toggles script on and off
- Suspend,Toggle
- return ;--
- LButton:: ;Check if mouse button get's released immediately
- KeyWait, %A_ThisHotkey%, T0.15
- if (ErrorLevel = 1) {
- Click down ;Holding down left mouse
- Loop
- {
- CoordMode, Mouse, Screen ;Move mouse
- MouseMove, 0, drop, ,r ;--
- Gosub, RandomSleep ;Trust me...sleep is good
- If(GetKeyState("LButton","P")=0) ;If LButton is released break out of loop
- Break ;--
- }
- KeyWait, %A_ThisHotkey%
- Click up ;--
- } else {
- Click ;Single click
- MouseMove, 0, drop, ,r ;--
- }
- return
- RandomSleep:
- Random, random, 13, 24, 18
- Sleep %random%-5
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement