I am VERY new to AHK, and am trying to ease my gaming in GW2. My problem is, my joints in my fingers are going, so I need to minimize the use of them. Is there a way to map both Left and Right mouse buttons to press at the same time if I press the F1 key? And have them stay down until I release the button (i.e. I press F1 and hold it, and the computer/game recognizes it as me pressing and holding both mouse keys down. I let go, and both keys are relased)? In game, we run and turn by holding both down and moving the mouse. I still want to move this way, but can no longer hold the buttons on the mouse down for very long. I've done searches, and tried altering the answers i find, but none are working.
Thanks.
Binding L and R mousebuttons to one keypress
Re: Binding L and R mousebuttons to one keypress
Your hotkey is F1. You can use either the Click command, which offers left/right and down/up (down is pressed, up is released) options to define what you want. To make the script wait for your key to be released, use the KeyWait parameter. Finish off your hotkey by putting a return at the end, which tells AHK "Don't execute any further lines" in this case. Alternatively to the Click command, you can use the Send command in much the same way. Your Left/Right mouse buttons are LButton and RButton, per Send documentation or KeyList; you can also specify an up/down state to those buttons/keys.
I think this script of yours should end up being 7 lines long.
I think this script of yours should end up being 7 lines long.
Re: Binding L and R mousebuttons to one keypress
I know my hotkey is F1. I know what I want to do, but I don't know how to do it. I am not good at this stuff.
Who is online
Users browsing this forum: sc30x and 69 guests