Looking how to make a script to press multiple buttons with single keystroke

Ask gaming related questions (AHK v1.1 and older)
Tcjenkens
Posts: 12
Joined: 31 Aug 2018, 17:43

Looking how to make a script to press multiple buttons with single keystroke

11 Apr 2019, 20:45

Hi I playing diablo 2. Im trying to press one key and have it press several keys. I want to be able to "m" and have it read in the game as "5v5v5v5ve"

Thanks for help
Rohwedder
Posts: 7655
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Looking how to make a script to press multiple buttons with single keystroke

12 Apr 2019, 00:53

Hallo,
try:

Code: Select all

m::Send, 5v5v5v5ve
You could change the keys press speed with SetKeyDelay:
https://autohotkey.com/docs/commands/SetKeyDelay.htm
Tcjenkens
Posts: 12
Joined: 31 Aug 2018, 17:43

Re: Looking how to make a script to press multiple buttons with single keystroke

12 Apr 2019, 19:28

Rohwedder wrote:
12 Apr 2019, 00:53
Hallo,
try:

Code: Select all

m::Send, 5v5v5v5ve
You could change the keys press speed with SetKeyDelay:
https://autohotkey.com/docs/commands/SetKeyDelay.htm
Thanks for help. unfortunately I think the action is too fast for the game to register. Is there a way to set a delay between the actions. Thank you.
Rohwedder
Posts: 7655
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Looking how to make a script to press multiple buttons with single keystroke

13 Apr 2019, 01:33

Hallo,
hadn't I written something about SetKeyDelay?
Here a very slow output:

Code: Select all

m::
SetKeyDelay, 500, 500
Send, 5v5v5v5ve
Return
Tcjenkens
Posts: 12
Joined: 31 Aug 2018, 17:43

Re: Looking how to make a script to press multiple buttons with single keystroke

18 Apr 2019, 21:19

Rohwedder wrote:
13 Apr 2019, 01:33
Hallo,
hadn't I written something about SetKeyDelay?
Here a very slow output:

Code: Select all

m::
SetKeyDelay, 500, 500
Send, 5v5v5v5ve
Return
Hey thank you for your help. but it seems on the first "5" and the "e" are registering in the game. Is there a way to send delays between the subsequent v's and 5's. Thank you.
Rohwedder
Posts: 7655
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Looking how to make a script to press multiple buttons with single keystroke

19 Apr 2019, 01:39

Hallo,
SetKeyDelay should work unless of course you are using SendMode input.
Try:

Code: Select all

m::
Loop, Parse,% "5v5v5v5ve"
{
	Send,% A_LoopField
	Sleep, 100
}

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 47 guests