Using one button to hold down others?

Ask gaming related questions (AHK v1.1 and older)
odbking
Posts: 1
Joined: 26 Apr 2018, 10:33

Using one button to hold down others?

26 Apr 2018, 10:36

Hey, I've been trying and searching forever for this. I got it to work once but I accidentally deleted my script and have no clue how i did it.

Basically I want to make it so my side mouse button XButton2 to hold down the numbers 1,2,3, and 4 as i hold down XButton2.

How do I get this to work because I am so stupid i cant
bryantan179
Posts: 74
Joined: 29 Mar 2017, 01:55

Re: Using one button to hold down others?

26 Apr 2018, 11:08

#MaxHotkeysPerInterval 9900000000000
#HotkeyInterval 9900000000000
#NoEnv


$*XButton2::
Loop
{
if not GetKeyState("XButton2","P")
break
Send {1 down}{2 down}{3 down}{4 down}
}
Send {1 up}{2 up}{3 up}{4 up}
Keywait, XButton2
Rohwedder
Posts: 7645
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Using one button to hold down others?

03 May 2018, 02:56

Hallo,
try:

Code: Select all

*XButton2::SendInput {Blind}{1 DownR}{2 DownR}{3 DownR}{4 DownR}
*XButton2 Up::SendInput {Blind}{1 Up}{2 Up}{3 Up}{4 Up}
By the way,

Code: Select all

#MaxHotkeysPerInterval 9900000000000
#HotkeyInterval 9900000000000
should only be used for bug search!

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: BielGuitarJP and 75 guests