Basically I want ALT+1 to equal F1, Alt+2 to equal F2, etc. However the game I'm playing uses alt as a dodge, so I have to hold the buttons for them to use the quick actions I'm trying to bypass by not having to hit the function keys. I'm looking for a way to priority the hotkeys so that if I hit ALT+x it will not use the normal ALT command unless I exclusively use that button by itself. Here's my current script (pretty basic), so I'm hoping there's a way to make this work:
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#IfWinActive, ahk_exe Biomutant-Win64-Shipping.exe
LAlt & 1::
Send {F1}
return
#IfWinActive, ahk_exe Biomutant-Win64-Shipping.exe
LAlt & 2::
Send {F2}
return
#IfWinActive, ahk_exe Biomutant-Win64-Shipping.exe
LAlt & 3::
Send {F3}
return
#IfWinActive, ahk_exe Biomutant-Win64-Shipping.exe
LAlt & 4::
Send {F4}
return
Update 1: Found a semi-helpful way of approaching this, but it still makes me dodge before the skill is used, it's just more reliable:
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#IfWinActive, ahk_exe Biomutant-Win64-Shipping.exe
LAlt & 1::
KeyWait LAlt
KeyWait 1
BlockInput On
Send {F1}
BlockInput Off
return
#IfWinActive, ahk_exe Biomutant-Win64-Shipping.exe
LAlt & 2::
KeyWait LAlt
KeyWait 2
BlockInput On
Send {F2}
BlockInput Off
return
#IfWinActive, ahk_exe Biomutant-Win64-Shipping.exe
LAlt & 3::
KeyWait LAlt
KeyWait 3
BlockInput On
Send {F3}
BlockInput Off
return
#IfWinActive, ahk_exe Biomutant-Win64-Shipping.exe
KeyWait LAlt
KeyWait 4
BlockInput On
Send {F4}
BlockInput Off
return