Question How do i uses this Auto Hot Key?

Ibraimo

Distinguished
Mar 8, 2016
118
3
18,585
Now i'm trying to use this AutoHotkey thingy, for a sorda speedrun on a game, i can't get into much details about the game i'm talking about but lets just say
I have this caracter that needs to open a box and take out the content in it, to do that you must press X key to open the box and then Y key to take out the content in it, i came across some videos about macros
and hot keys, and this is what i got so far
$x::
Send, {x}
Sleep,8
Send, {y}
While GetKeyState("x", "y")
Continue
Send, {y}
Send, {x}
Return

Now when i press X the caracter will instantly open and take out the content in the box, but thing is, the hotkey doesn't work if i crouch, for exemple if i press CTRL and then X, the caracter will only open the box, but wont take out the content in it, i tried switch the keys, to |$Lctrl::| but now instead of holding crouching it only taps it
I'm Trying to figure out the keycodes in order to hold Crouch and when i press X it will open the box and the remove the content in it. Do you have any idea how to do so?
I have also tried |$x::^LCtrl| but now, the caracter crouches and opens the box but doesn't take out the content, even when i press Y, which beats the whole point of opening the box while crouching.
 
Last edited:

Ralston18

Titan
Moderator
This:

" i can't get into much details about the game i'm talking about".

Without knowing what game you are playing any suggestions etc. are mostly guess work.

Key presses (or combinations thereof) must go through the keyboard drivers, Windows, and the game itself.

Macros that are acceptable or allowed to "go all the way" may not be at all viable.
 

Ibraimo

Distinguished
Mar 8, 2016
118
3
18,585
This:

" i can't get into much details about the game i'm talking about".

Without knowing what game you are playing any suggestions etc. are mostly guess work.

Key presses (or combinations thereof) must go through the keyboard drivers, Windows, and the game itself.

Macros that are acceptable or allowed to "go all the way" may not be at all viable.
This:

"Key presses (or combinations thereof) must go through the keyboard drivers, Windows, and the game itself.

Macros that are acceptable or allowed to "go all the way" may not be at all viable."

Doesn't really my question, i gave alot of details on what's going on.