latin625 Posted March 5, 2023 Share Posted March 5, 2023 I can load the xarcade input.exe as an additional application before the game starts to get xinput working. However, when I exit the game, I can not close the arcade input application (xarcade input.exe). I have an ahk script that is this to launch the app: (I run the shortcut to avoid issues with the CMD window) Sleep 15000 RunWait, "D:\LaunchBox\ThirdParty\xarcade-xinput\XArcade XInput.exe - Shortcut"--skip-ui ExitApp Here is my script that I automatically run after the main application: if WinExist("XArcade XInput.exe - Shortcut") WinClose ; Use the window found by WinExist. ExitApp Shouldn't it close the application? Is there a better way to run this as possibly one script? Load the app and on exit, close / terminate the app? Im still learning AHK scripts, so apologies for the bad code. Quote Link to comment Share on other sites More sharing options...
Retro808 Posted March 5, 2023 Share Posted March 5, 2023 You could put everything into one AHK script then compile it into a .exe. Then point to the launcher .exe as the game exe in LB. The launcher would start Xinput, then SFV, and shut down Xinput when SFV is closed. Below is what I use. It is years old and simplest form as I am not overly concerned about seamless environment so it works for my needs: #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #SingleInstance, Force #Persistent Run D:\LaunchBox\Xarcade Xinput\XArcade XInput.exe Sleep, 5000 Run, StreetFighterV.exe Sleep, 1000 SetTimer, ProcessCheckTimer, 2000 Return ProcessCheckTimer: Process, Exist, StreetFighterV.exe pid1 := ErrorLevel If (!pid1) { Process, Close, XArcade XInput.exe ExitApp } Return Whatever exact scripting you need for your set-up (paths, sleep times) just write them as one ahk file (Name whatever you want). Save it and then right click and choose "Compile Script". The new exe that was just created point LB to that. No need for an additional app and the original game exe. 1 Quote Link to comment Share on other sites More sharing options...
latin625 Posted March 5, 2023 Author Share Posted March 5, 2023 Thanks! 🏆 Works like a charm! Very cool script that I will modify for use with other x arcade required games. Made some updates to hide the cmd windows and browser interface when launching the game My current script: #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #SingleInstance, Force #Persistent Run "D:\LaunchBox\ThirdParty\xarcade-xinput\XArcade XInput.exe - Shortcut" --skip-ui Sleep, 5000 Run, D:\LaunchBox\Games\PC Games\Street Fighter V - Champion Edition\StreetFighterV\Binaries\Win64\StreetFighterV.exe Sleep, 1000 SetTimer, ProcessCheckTimer, 2000 Return ProcessCheckTimer: Process, Exist, StreetFighterV.exe pid1 := ErrorLevel If (!pid1) { Process, Close, XArcade XInput.exe ExitApp } Return Quote Link to comment Share on other sites More sharing options...
w00master Posted August 12 Share Posted August 12 Commenting on this almost 1 1/2 years later, and this works beautifully. Thank you both for this!!!! 1 Quote Link to comment Share on other sites More sharing options...
latin625 Posted August 26 Author Share Posted August 26 (edited) Just an Update... That Shortcut in the script is critical. It will not work (at least for me) without it. Make a shortcut to the XArcade Xinput.exe, then add that location to the script. Stiil very cool to see this working, just had to remember that trick. Also steamapps on your windows drive is where all the games are downloaded to from steam, in case you need to update the location of the game. GAME ON! STEAM CODE UPDATE FOR ME: #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. #SingleInstance, Force #Persistent Run "F:\Tools\xarcade-xinput\XArcade XInput.exe - Shortcut" --skip-ui Sleep, 5000 Run, F:\SteamLibrary\steamapps\common\StreetFighterV\StreetFighterV\Binaries\Win64\StreetFighterV.exe Sleep, 1000 SetTimer, ProcessCheckTimer, 2000 Return ProcessCheckTimer: Process, Exist, StreetFighterV.exe pid1 := ErrorLevel If (!pid1) { Process, Close, XArcade XInput.exe ExitApp } Return Edited August 27 by latin625 New update to use Steam Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.