Making AHK to help one handed play.

Ask gaming related questions
avallanch
Posts: 2
Joined: 06 Jun 2023, 15:15

Making AHK to help one handed play.

Post by avallanch » 06 Jun 2023, 15:20

Im trying to make a script to send a key if it sees a skill off cooldown/hp low since one handed play is hard as it is :)
but im encountering an issue when i actively use the pad one of joysticks the script is not sending the key.
once i let go of the joystick it sends it to the game.

my script below:

Code: Select all

switcher:=1
loop
{
if (switcher) {
if PixelSearch(&Px, &Py, 579, 946, 619, 946, 0x1B1A1B, 10){
     Send "q"
	}
if PixelSearch(&Px, &Py, 969, 992, 1009, 992, 0x604A27, 10){
    Send "4"
	}
}
Sleep 500
[Mod edit: [code][/code] tags added. Please use them yourself going forward.]

avallanch
Posts: 2
Joined: 06 Jun 2023, 15:15

Re: Making AHK to help one handed play.

Post by avallanch » 06 Jun 2023, 15:32

It might be related to the game itself (Diablo 4) having issues with keyboard and controller at the same time, but i have no clue how to send out controller buttons

Code: Select all

Send "Joy5" 
just sends j, o, y keys :)

User avatar
boiler
Posts: 16903
Joined: 21 Dec 2014, 02:44

Re: Making AHK to help one handed play.

Post by boiler » 07 Jun 2023, 04:22

You cannot send controller buttons with AHK. You can only read them (i.e,, get their state or make hotkeys of them). There is more on that here.

Post Reply

Return to “Gaming”