PS4 Controller inputs via AutoIT senden?

09/19/2018 20:49 Artarex#1
Gibt es eine Möglichkeit PS4 Controller Inputs über AutoIT zu senden?

Spiele FIFA auf dem PC und wenn er per ImageSearch ein bestimmtest bild findet soll er eine taste von einem ps4 controller senden.

Bisher habe ich nur udf's gefunden, die inputs auslesen können, nicht aber senden.

LG
09/26/2018 06:52 FasTZiinnN#2
well, i dont speak german but i think you can use winmn.dll dllstructcreate using JoyGetPos
or sequence LPT1
i can help you if you write english

by the way, using pixel search with 3 pos its better than image search
11/15/2018 00:06 Silbi#3
I have the same problem and just need an example of how to send the SQUARE-Ps4-Controller-Button.

The Joystick.au3 told me my SQUARE Button ID is "1" so I tried with the script below to send a SQUARE click every 2 seconds but it wont work.

Code:
while 1
	Sleep(2000)
	_Send_Virtual_Key(1)
WEnd

Func _Send_Virtual_Key($iCode)
    If Not IsInt($iCode) Then Return
    DllCall('user32.dll', 'int', 'keybd_event', 'int', $iCode, 'int', 0, 'int', 0, 'ptr', 0)
    DllCall('user32.dll', 'int', 'keybd_event', 'int', $iCode, 'int', 0, 'int', 2, 'ptr', 0)
EndFunc