▲ 1 r/AutoHotkey
Delay, sleep, or some limiting factor on SendInput
Hi all,
I have carpal tunnel and can't repeatedly click my mouse which is unfortunately somewhat required for playing minecraft. I have a script so that I can use my scroll wheel instead, but I don't want to be able to click 60+ times per second because a) that's super unfair and b) it will trigger an automatic ban from many servers. I know that you cannot implement a key delay for SendInput, but I have tried all the other sending methods and it does not function properly, just lagging my screen and making a bunch of beeping sounds? (I think the same sound as when you have sticky keys on?). Here is my code below; let me know if you can think of any suggestions for this.
#MaxHotkeysPerInterval 100
#If WinActive("Minecraft") && (WinActive("ahk_exe javaw.exe") || WinActive("ahk_exe java.exe"))
#If GetKeyState("RButton","P")
*WheelDown::SendInput {Click Right}
*WheelUp::SendInput {Click Right}
#If
~RButton Up::Send % InStr(A_PriorHotkey,"Wheel")?"{Return}":
#If GetKeyState("LButton","P")
*WheelDown::SendInput {Click Left}
*WheelUp::SendInput {Click Left}
#If
~LButton Up::Send % InStr(A_PriorHotkey,"Wheel")?"{Return}":
u/sl1dr_ — 13 days ago