Question about send...

Ask gaming related questions (AHK v1.1 and older)
shanshans
Posts: 27
Joined: 13 Dec 2015, 08:10

Question about send...

Post by shanshans » 08 May 2022, 11:52

0::w
1::Send, {w down}d{w up}
2::Send, {w down}{w up}
3::Send, {w down}{d down}{w up}{d up}
4::Send w

The game(this game is a special case) i testing will accept 0 as w just like native. (All key state)
For 1, it kind of recognize it as a tap, maybe... It got a hard time to output W or D when you are holding 1.
2-4 doesn't work at all

There are two questions i want to ask

1. What is the different between "Key::Key" and Send (0::w VS 0::send w)
2. Is "Key::Key" only can output one key only? Can it be more than one and how ?

thks

Rohwedder
Posts: 7774
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Question about send...

Post by Rohwedder » 08 May 2022, 11:57

Hallo,
1. What is the different between "Key::Key" and Send (0::w VS 0::send w)
https://www.autohotkey.com/docs/misc/Remap.htm#remarks
When a script is launched, each remapping is translated into a pair of hotkeys. For example, a script containing

Code: Select all

a::b
actually contains the following two hotkeys instead:

Code: Select all

*a::
SetKeyDelay -1   ; If the destination key is a mouse button, SetMouseDelay is used instead.
Send {Blind}{b DownR}  ; DownR is like Down except that other Send commands in the script won't assume "b" should stay down during their Send.
return

*a up::
SetKeyDelay -1  ; See note below for why press-duration is not specified with either of these SetKeyDelays.
Send {Blind}{b up}
return
2. Is "Key::Key" only can output one key only? Can it be more than one and how ?
Try:

Code: Select all

#InputLevel, 1
a::b
#InputLevel, 0
~b::c
a can output b & c
or (not recommended!)

Code: Select all

#MaxHotkeysPerInterval, 200
#InputLevel, 2
a::b
#InputLevel, 1
~b::c
#InputLevel, 0
~c::d
a can output b & c & d

shanshans
Posts: 27
Joined: 13 Dec 2015, 08:10

Re: Question about send...

Post by shanshans » 08 May 2022, 12:47

Thks for the reply, it is helpful :)

Post Reply

Return to “Gaming Help (v1)”