Rapid Fire Hotkey Help Topic is solved

Ask gaming related questions (AHK v1.1 and older)
RichRichie
Posts: 2
Joined: 29 Aug 2021, 04:19

Rapid Fire Hotkey Help

03 Oct 2021, 20:04

I'm trying to create a hotkey for my Rshift button so I can hold down that button to rapid fire the shortcut associated with it.
I'm basing my script on this forum, but I can't get it to work. https://www.autohotkey.com/board/topic/87134-rapid-fire-hotkey-help/

Code: Select all

Rshift::
while GetKeyState(Rshift)
    {
        DllCall("mouse_event", uint, 1, int, 100, int, 0)
	Sleep, 10
    }
return
For your information,

Code: Select all

DllCall("mouse_event", uint, 1, int, 100, int, 0)
moves the mouse cursor horizontally to the right. (I got it from this forum. https://www.autohotkey.com/board/topic/65492-fps-game-mouse-movement-via-keyboard/ )
While I think that I got a mistake over at the loop, I'm not really sure anymore since the original forum doesn't handle DllCall.
User avatar
mikeyww
Posts: 26883
Joined: 09 Sep 2014, 18:38

Re: Rapid Fire Hotkey Help  Topic is solved

03 Oct 2021, 20:41

Functions accept expressions rather than literal strings.

Code: Select all

RShift::
While GetKeyState("RShift", "P")
{
 DllCall("mouse_event", "UInt", 1, "UInt", 10, "UInt", 0)
 Sleep, 10
}
Return
RichRichie
Posts: 2
Joined: 29 Aug 2021, 04:19

Re: Rapid Fire Hotkey Help

27 Oct 2021, 20:56

Thanks for the help! Sorry it took me this long to thank you. I'm not sure if this extra message would bother you since you don't need to answer this message.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 78 guests