XBOX Controller - 2 Buttons at the same time

Post gaming related scripts
noxx
Posts: 8
Joined: 01 Jan 2017, 12:20

XBOX Controller - 2 Buttons at the same time

01 Jan 2017, 13:55

hello

ive a problem with this script here

Code: Select all

Joy7 & Joy8::
{ 
    run, notepad
    return
}
notpad should only open if i press button 7 AND button 8.
but notepad open if i press only button 8
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: XBOX Controller - 2 Buttons at the same time

03 Jan 2017, 05:41

AFAIK, AHK Does not support two joystick buttons properly.

Use something like:

Code: Select all

Joy7::
	if (GetKeyState("Joy8", "P"))
		GoSub, SendKeys
	return

Joy8::
	if (GetKeyState("Joy7", "P"))
		GoSub, SendKeys
	return

SendKeys:
	run, notepad
	return

Return to “Gaming Scripts (v1)”

Who is online

Users browsing this forum: No registered users and 62 guests