XBOX controller Autofire issues

Ask gaming related questions
3os
Posts: 12
Joined: 11 Jul 2016, 16:46

XBOX controller Autofire issues

29 May 2017, 04:50

Dear All

I have problems getting AHK to send autofire commands from my controller. The following code works perfectly fine for a keyboard key, but when I replace the "e" key with "Joy1" it does nothing. any suggestions?

Works fine:

Code: Select all

$e::
 While GetKeyState("e","p"){
  Send e
  Sleep 10
 }
return
Does not work when replacing "e" with "joy1":

Code: Select all

Joy1::
 While GetKeyState("Joy1","p"){
  Send Joy1
  Sleep 100
 }
return
any help is appreciated
regards
3os
neomulemi6
Posts: 216
Joined: 30 Jun 2016, 06:01

Re: XBOX controller Autofire issues

29 May 2017, 09:54

AutoHotkey can't send gamepad buttons. What you can do, however, is bind the function in the game to another key, and then activate/disable a loop with your gamepad button. Something like this:

If you had "fire" bound to the 1 key in your game, this would work.

Code: Select all

Joy1::
SetTimer, J1, 100
KeyWait, Joy1
SetTimer, J1, Delete
Return

J1:
Send 1
Return

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 11 guests