Jump to content
LaunchBox Community Forums

latin625

Members
  • Posts

    625
  • Joined

  • Last visited

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

latin625's Achievements

64-Bit Supercomputer

64-Bit Supercomputer (6/7)

56

Reputation

  1. 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
  2. All credit to isometrixk I updated my code from another post and now all my Mame games launch the correct recoil (semi vs automatic) type of gun that I want to fire during gameplay. A couple of things: Every game in LaunchBox must be edited to run these scripts individually. There is no workaround. When switching gun types, there is a 5 second delay after the previous executables are killed to allow time to fully close One time, only one of my Sinden guns switched. This makes me think the 5 second delay wasn't long enough. Besides that, it works great with LaunchBox with Mame and I'm going to try a few more emulators later. Prerequisites You created separate folders for each of your guns containing the Lightgun.exe. The folder path to your automatic Lightgun.exe setup must contain "auto". It doesn't matter where, it just matters "auto" is in the file path. C:\LightGuns\auto\..\Lightgun.exe Every Lightgun.exe is configured to "Start Application in System Tray" (bottom-right corner of Configuration tab) Save the two configurations below as Batch (.bat) files - edit each file to CD into your correct Lightgun.exe folder paths, I left my paths as examples. Obviously save them so you remember which is for automatic recoil and semi recoil. LaunchBox Add Additional Apps to run for each game by selecting a game, Edit > Metadata > Additional Apps Click Add Application Application Name: Type any name, doesn't matter Application Path: Browse to the appropriate batch file to run auto or semi recoil Check "Automatically Run Before Main Application" - runs the batch file before the Mame game executes Check "Wait for Exit" - waits for the batch file to complete before launching the Mame game That's it! Do this for each of your games, there is no easy way around this in LaunchBox. Batch Scripts Automatic --- IMPORTANT --- notice the "auto" keyword in my filepaths for this! @echo off setlocal enableextensions enabledelayedexpansion set "process=Lightgun.exe" for /f "usebackq skip=1 delims=" %%p in (`wmic process where "name='%process%'" get executablepath 2^>nul`) do ( if not defined exePath ( set "exePath=%%p" ) ) if not "%exePath%" == "" ( if not x%exePath:auto=%==x%exePath% ( REM do nothing... ) ELSE ( TASKKILL /F /IM Lightgun.exe TIMEOUT 5 /NOBREAK CD "C:\LightGuns\sindengun1auto\SindenLightgunWindowsSoftwareV1.08\SindenLightgun\" START Lightgun.exe CD "C:\LightGuns\sindengun2auto\SindenLightgunWindowsSoftwareV1.08\SindenLightgun\" START Lightgun.exe ) )^ else ( CD "C:\LightGuns\sindengun1auto\SindenLightgunWindowsSoftwareV1.08\SindenLightgun\" START Lightgun.exe CD "C:\LightGuns\sindengun2auto\SindenLightgunWindowsSoftwareV1.08\SindenLightgun\" START Lightgun.exe ) endlocal For Semi Auto setup @echo off setlocal enableextensions enabledelayedexpansion set "process=Lightgun.exe" for /f "usebackq skip=1 delims=" %%p in (`wmic process where "name='%process%'" get executablepath 2^>nul`) do ( if not defined exePath ( set "exePath=%%p" ) ) if not "%exePath%" == "" ( if not x%exePath:auto=%==x%exePath% ( TASKKILL /F /IM Lightgun.exe TIMEOUT 5 /NOBREAK CD "C:\LightGuns\sindengun1\SindenLightgunWindowsSoftwareV1.08\SindenLightgun\" START Lightgun.exe CD "C:\LightGuns\sindengun2\SindenLightgunWindowsSoftwareV1.08\SindenLightgun\" START Lightgun.exe ) ELSE ( REM do thing... ) )^ else ( CD "C:\LightGuns\sindengun1\SindenLightgunWindowsSoftwareV1.08\SindenLightgun\" START Lightgun.exe CD "C:\LightGuns\sindengun2\SindenLightgunWindowsSoftwareV1.08\SindenLightgun\" START Lightgun.exe )
  3. @axman21 You can add an extension to it by renaming it and adding .exe on the end. It will still run with Teknoparrot alone or the through LB with no problem. Use the same file you use to run it in TP, just add .exe on the end.
  4. @The Hobgoblin That is the exe file. You can add an extension to it by renaming it and adding .exe on the end. It will still run with Teknoparrot alone or the through LB with no problem. Copy and pate the Jenniferpatched if you are worried about it not working. Save that Jenniferpatched as a Copy, then rename the original one.
  5. No joy with the suggestion. i might have to live with it being a one player game for now. Everything looks right but doesnt work as expected. Ill keep tinkering ans seeing what is what. Thanks for the help !!!! my latest attempt: #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 l:: while (getkeystate("l","p")) { send, {Numpad2 down} sleep 100 } send {Numpad2 up} Return
  6. Still nothing. Just wont register. #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. a:: while (getkeystate("a","p")) { send, {Numpad2 down} sleep 100 } send {Numpad2 up} Return
  7. No joy. Gonna tinker a bit with it. Cant get the Q key to send numpad2 . I am running it separate from the other because I am not sure how to add it to the original script you sent me. It sends it on notepad and I see the number 2, but in the game nothing. I have to press the physical numpad 2 key to give player two gas. q:: while (getkeystate("q","p")) { send, {2 down} sleep 100 } send {2 up} Return
  8. What is the P for in the line below? Is it a pause command? while (getkeystate("space","p"))
  9. Super Thanks!!!!!!!! It worked! Now I tried to copy and paste the code again to make it work the same way for player 2 using the "2" key on the keypad. This let's player 2 do the same as player one with the gas and boost. Do I need to encapsulate the remap? Didnt work for me when I tried to use player 2. #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 Space:: while (getkeystate("space","p")) { send, {up down} sleep 100 } send {up up} Return q:: while (getkeystate("q","p")) { send, {2 down} sleep 100 } send {2 2} Return
  10. Thanks @JoeViking245. I tried both and they work, kinda... The pressing (pressing up and down) of the space key send the click, but does not detect just pressing down like you would with the keyboard UP key for gas. A double tap of the space or UP key does Turbo boost. Single tap or press give acceleration / gas only. Trying to get the space key to act like the up arrow when pressed down only to give gas, the double tap seems to be 100% good. Ill keep tinkering and see what I get. I see AHk offers something called Send longpress
  11. I am trying to get the space key on my xarcade to register as UP arrow on Hot Wheels King of the Road and cant seem to get it going. This is my script. It works! when I test it on notepad and stuff I get the cursor going up with each space key press. But when I am playing the game, only the up arrow on the keyboard works and give it gas. Any ideas? Left, right works too. #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 Space::SendInput, {Up} ; Press 2x for Boost/ just pressing will give Gas
  12. Hi, I am having to reset the clock time on this game every time I run it. I set it and I save it but it clears again. Cant locate the file that sets that up to make it only readable. Anyone have a solution or knows where these setting files might be? I can get to the service menu. Just doesn't keep the changes. Thanks,
  13. Thanks! Ill take a shot! Where can I find it? I see it on the webs, but I am not sure if that is the correct one. I tried it and it was given all kinds of errors when I tried to open LB.
  14. Hello, Anyone have experience with reshade? How do you save the settings for each game? Ive tried to do the autosave and presets, but if I exit the game and then change it for say.. a lightgun game and then come back, it is still with the border on the previous game. Any one have a solution for this? Thanks
×
×
  • Create New...