Hotkey button doesn't function normally

Ask gaming related questions (AHK v1.1 and older)
Esperantastic
Posts: 1
Joined: 30 Jun 2022, 07:56

Hotkey button doesn't function normally

Post by Esperantastic » 30 Jun 2022, 08:17

I'm playing minecraft and there's a lot of keybinds and commands I was looking to remap to XButton2 followed by another button (for example using XButton2 & 1 to type /home using autohotkey, while also using XButton2 & C to open the GUI for tweakeroo - the mod in question supports multi button input so I'm not using autohotkey for it)
Problem is that XButton2 doesn't work in game, I can't assign controls in mod GUIs or vanilla controls to use XButton2. Is there a fix to this? Code below (sorry if this is a really simple fix I started using autohotkey a few days ago and don't have any other coding knowledge)

Code: Select all

#IfWinActive Minecraft* 1.16.5
XButton2 & 1::
send, /
sleep 25
send, home
send, {enter}
Return

XButton2 & 2::
send, /
sleep 25
send, back
send, {enter}
Return
[Mod edit: [code][/code] tags added.]

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

Re: Hotkey button doesn't function normally

Post by mikeyww » 30 Jun 2022, 08:57

Wildcard is not supported in WinTitle by default. See :arrow: WinTitle and SetTitleMatchMode. Also viewtopic.php?f=7&t=11084 in case helpful. I would start by removing your #If directive, and testing your script in Notepad. That tells you if the basic script works. Start with one hotkey instead of a custom combination. See documentation about custom combinations.

Post Reply

Return to “Gaming Help (v1)”