New to AHK (from xmouse button)

Ask gaming related questions (AHK v1.1 and older)
kurapicas
Posts: 4
Joined: 16 Jul 2018, 09:33

New to AHK (from xmouse button)

Post by kurapicas » 21 Oct 2021, 16:55

So Basically I need help porting this to AHK as my mouse side button died.

This was from my X-mouse Button

{CAPSLOCKOFF}{WAITMS:10}{CAPSLOCK}{RMBD}

So basically the code send capslock off state then press down capslock (capslock On) + right click mouse down for 60 second

then repeat (loop) again.

can you also bind it to hotkey LCTRL (on/off)

Thanks.

User avatar
mikeyww
Posts: 26939
Joined: 09 Sep 2014, 18:38

Re: New to AHK (from xmouse button)

Post by mikeyww » 21 Oct 2021, 19:04

Code: Select all

LCtrl::
Loop, 2 {
 SetCapsLockState, Off
 Sleep, 10
 SetCapsLockState, On
 Click, R D
 Sleep, 60000
 Click, R U ; Delete if not needed
}
Return
You can click on the commands in the posted script to read about them.

kurapicas
Posts: 4
Joined: 16 Jul 2018, 09:33

Re: New to AHK (from xmouse button)

Post by kurapicas » 22 Oct 2021, 12:25

cant get it to work. It does toggle capslock state on and off and right click.

Im looking for Holding CapsLock Down + Holding Down Right Mouse button.

User avatar
mikeyww
Posts: 26939
Joined: 09 Sep 2014, 18:38

Re: New to AHK (from xmouse button)

Post by mikeyww » 22 Oct 2021, 12:38

You could try Send {CapsLock down}. Also see https://www.autohotkey.com/docs/commands/SetStoreCapslockMode.htm. You can remove the click up as already noted. See KeyHistory to understand what is happening with the keys.

Post Reply

Return to “Gaming Help (v1)”