help with my joystick

Ask gaming related questions (AHK v1.1 and older)
seba16201620
Posts: 17
Joined: 13 Mar 2020, 11:15

help with my joystick

30 Mar 2020, 11:48

Code: Select all

Mynumber:= 805


Joy4:: 

Send {Joy4 down}

if GetKeyState("Joy4")  ; The button has been released.
{   
    
    Sleep, Mynumber
    Send {Joy4 up}  ; Release the spacebar.    
    return
}
i need to press the button 4 with sleep in my joystick but doesn't work , any can help me??
User avatar
Yakshongas
Posts: 590
Joined: 21 Jan 2020, 08:41

Re: help with my joystick

30 Mar 2020, 12:50

Try this:

Code: Select all

Mynumber:= 805
state :=GetKeyState(Joy4, T)

$Joy4:: 

Send {Joy4 down}

if (state=0)
{   
    
    Sleep, Mynumber
    Send {Joy4 up}    
    return
}
Please mark your topics as solved if you don't need any further help. ✅

Need a little more help? Discord : Yakshongas#9893 🕹
seba16201620
Posts: 17
Joined: 13 Mar 2020, 11:15

Re: help with my joystick

30 Mar 2020, 15:21

@Yakshongas

Hey bro, i added you, but the ahk doesn't work :/

my nickname in discord pablomorza#6222
gregster
Posts: 9114
Joined: 30 Sep 2013, 06:48

Re: help with my joystick

30 Mar 2020, 15:26

I don't think you can send Joystick buttons via plain AHK. I think you need an additional joystick emulator... but I am not a gamer, so I don't know details.
seba16201620
Posts: 17
Joined: 13 Mar 2020, 11:15

Re: help with my joystick

30 Mar 2020, 15:31

@gregster
Hi!

And how can I do this? What use is an extra emulator?

Thanks!

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 88 guests