joy button for exernal program not working

Ask gaming related questions (AHK v1.1 and older)
DRLantern
Posts: 45
Joined: 05 May 2023, 20:21

joy button for exernal program not working

Post by DRLantern » 28 May 2023, 00:21

hello, so u know buttons like 1joy1 and 2joy1, well they work for almost any gaming application, its just they dont work for when the the applications lets u add a controller, and when that happens, it only lets u add the controller state of specific controller and not the hotkeys of 1joy1 amd 2joy1 itself, cans someone help me fix this, because the applications only works for 4 controller and not 16. https://ibb.co/4YCVzpm
[Mod edit: Removed img-tags since they only work with direct image links.]

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

Re: joy button for exernal program not working

Post by boiler » 28 May 2023, 07:27

I can’t tell what you mean by this, but are you saying it adds it as controller 4? If so, did you try 4Joy1 and 4Joy2?

DRLantern
Posts: 45
Joined: 05 May 2023, 20:21

Re: joy button for exernal program not working

Post by DRLantern » 28 May 2023, 11:50

well it depends, does 4joy adds 4 controllers to the program all at once or does it just adds the 4th controller, cause what im trying to is add controller inputs individually to separate window, somehow i cant do that because it when the gamepad button is not checked i cant send inputs, it only sends state of the controller that i choose for the window and not the state of the hotkey controls

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

Re: joy button for exernal program not working

Post by boiler » 28 May 2023, 12:51

I still don’t understand what you’re trying to say. AHK doesn’t add any controllers. That’s how it references whatever controllers are connected by their controller number.

DRLantern
Posts: 45
Joined: 05 May 2023, 20:21

Re: joy button for exernal program not working

Post by DRLantern » 28 May 2023, 13:13

i can show a video if u want, for a better understandment of knowing what im talking about

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

Re: joy button for exernal program not working

Post by boiler » 28 May 2023, 13:29

I don’t think a video will help because it’s the way you are asking about what AHK is doing (“does 4joy adds 4 controllers”) that won’t be cleared up by a video. I am trying to help you understand how to use AHK, not how some external program adds controllers or whatever it’s doing.

DRLantern
Posts: 45
Joined: 05 May 2023, 20:21

Re: joy button for exernal program not working

Post by DRLantern » 28 May 2023, 13:47

ik but i read the documents about 1joy or 2joy and basically it send the input with the controller not the full controller input, I get that, its just i cant use it on its window because it only lets u add a controller to a program not sending it for somer eason, thats the point im getting at and not the other gaming windows where u can just send the controller button with joystick, "NOT THE FULL JOYSTICK just the buttons" and just play that way if it will let u use joystick for a game, this uses keyboar dand controller exept keyboard elts u just send keys the controller u have to choose and not send for some reason, make sense, i tried as hard as i can to explain it

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

Re: joy button for exernal program not working

Post by boiler » 28 May 2023, 14:03

No, that doesn’t make it any clearer. You keep using generalities and terms that no one else uses, so it’s not possible to know what you’re saying. Maybe it’s me, so I’ll just leave it to others who might get what you’re saying.

DRLantern
Posts: 45
Joined: 05 May 2023, 20:21

Re: joy button for exernal program not working

Post by DRLantern » 28 May 2023, 14:06

also here is the link i asked to show u https://drive.google.com/file/d/1gNDv9yYSDBXKNss1s3BwKEZHchJYS0Ek/view?usp=drive_link
https://drive.google.com/file/d/1dooFW8pdyXxyswDHMHb9Vfbr7ixBqHT2/view?usp=drive_link








and here is the script

Code: Select all

#persistent

run, %PATH%

if WinExist("%WINTITLE%")
{
if GetKeyState("1Joy1","P") ;note the "
{
Send, {1Joy1}
}
if GetKeyState("1Joy2","P") ;note the "
{
Send, {1Joy2}
}
if GetKeyState("1Joy3","P") ;note the "
{
Send, {1Joy3}
}
if GetKeyState("1Joy3","P") ;note the "
{
Send, {1Joy3}
}
if GetKeyState("1Joy4","P") ;note the "
{
Send, {1Joy5}
}
if GetKeyState("1Joy6","P") ;note the "
{
Send, {1Joy6}
}
if GetKeyState("1Joy7","P") ;note the "
{
Send, {1Joy7}
}
}

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

Re: joy button for exernal program not working

Post by boiler » 28 May 2023, 14:23

You can’t send controller buttons. You can only get their state.

The syntax in your WinExist() parameter is incorrect, by the way.

DRLantern
Posts: 45
Joined: 05 May 2023, 20:21

Re: joy button for exernal program not working

Post by DRLantern » 28 May 2023, 14:26

so u can only send keyboasrd keys instead of controller buttons?

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

Re: joy button for exernal program not working

Post by boiler » 28 May 2023, 14:36

You can send keyboard keystrokes and mouse clicks, but not controller buttons. This is explained further here.

Post Reply

Return to “Gaming Help (v1)”