latin625 Posted September 5, 2016 Share Posted September 5, 2016 Hi, So I was able to get myPC games running with some great help from the forum. Now, I wast to be able to use autohotkey to handle the controls of games like Mortal Kombat and SFxTekken. I can create scripts, but I need an emulator in order to run them. PC games dont use emulators, hence my issue. Any advice? I can go with Vjoy but would like to use AHK. Thanks! Link to comment Share on other sites More sharing options...
latin625 Posted September 5, 2016 Author Share Posted September 5, 2016 ok. So I figured oiut I can launch another program like vjoy which is great! But how do I turn it off after I exit the game? Link to comment Share on other sites More sharing options...
DOS76 Posted September 5, 2016 Share Posted September 5, 2016 Make another app for the same program you will need to be able to tell it to close through the command line and then tick the text box to run after. Link to comment Share on other sites More sharing options...
Sithel Posted September 5, 2016 Share Posted September 5, 2016 I'd do like @DOS76 suggested, creating .bat or .cmd files are easy. Here is probably the code I'd use to exit that app. @echo off taskkill /f /im VJoy.exe exit 1 Link to comment Share on other sites More sharing options...
DOS76 Posted September 5, 2016 Share Posted September 5, 2016 what do /f & /im switchs do in the command? 1 Link to comment Share on other sites More sharing options...
latin625 Posted September 5, 2016 Author Share Posted September 5, 2016 Thanks! so I have a .bat file that launches the pc game .exe, but how do I turn on vjoy and turn it off when the game exits? Currently I use the additional app option on the game edit to add the bat. SAMPLE OF MY BAT BELOW: start MKKE.exe. Below is a screengrab. Ideally, I want to be able to start Vjoy when the game launches and kill vJoy when I exit the game. Link to comment Share on other sites More sharing options...
DOS76 Posted September 5, 2016 Share Posted September 5, 2016 Yeah make a 2nd additional app have it execute the.bat that @Sithel suggested with the after check box ticked. Link to comment Share on other sites More sharing options...
latin625 Posted September 5, 2016 Author Share Posted September 5, 2016 yes, I tried this and it wont launch vJoy... Am I doing something wrong? I think I may have to actually as the system to check and see if it this running first, no? I think what is happening is that it is launching it, then task killing it... Link to comment Share on other sites More sharing options...
latin625 Posted September 5, 2016 Author Share Posted September 5, 2016 I am trying to do something like this, but cant get vjoy to open on launch. start "C:\Program Files (x86)\VJoy\VJoy.exe" start /wait "D:\Arcade\System roms\PC Games\Mortal Kombat Komplete\MKKE.exe" taskkill /im VJoy.exe Link to comment Share on other sites More sharing options...
Sithel Posted September 5, 2016 Share Posted September 5, 2016 38 minutes ago, DOS76 said: what do /f & /im switchs do in the command? /f forces the kill of the process /im is the image name of the process to be killed which is usually the .exe name @latin625 I'll try to mess with it to see if I can get it to work, but it seems what your doing in your .bat is starting VJoy and killing it in the same .bat which I'd assume wouldn't be what you want. 1 Link to comment Share on other sites More sharing options...
latin625 Posted September 5, 2016 Author Share Posted September 5, 2016 (edited) Thanks Sithel! I only want to use vjoy on games that I choose. Like MK, SFxTekken, and most PC games. Otherwise, I want it to be disable and just rely on the mini pac interface of the Tankstick. The ALT key on the tankstick is not recongized on MK. THANKS!!! I will continue tinkering too, hopefully we can get something. I bet there are lots of users out there with the same issues. Once the exe that is in the .bat is terminated, I would like to have vjoy terminate too. On launch of the exe, it should trigger the launch of vJoy as well. Edited September 5, 2016 by latin625 Link to comment Share on other sites More sharing options...
latin625 Posted September 5, 2016 Author Share Posted September 5, 2016 Hey! Ok, so I think I might be on to something. I found a xbox360.ini file and tester that seems to work initially! I got it from the xarcade website. Maybe we wont need vjoy at all. Going to tinker inside of the ini file, but looks promising. Here is the link. http://www.xgaming.com/service/ServiceFiles/Xinput.zip Link to comment Share on other sites More sharing options...
Sithel Posted September 5, 2016 Share Posted September 5, 2016 (edited) Sounds good, I think I got this bat file working and you'll need 2 .bat files. One to open the app and another to kill the app. In Additional Apps, Add Application for opening VJoy there and select "Automatically Run Before Main Application" and "Wait for Exit" @echo off start "VJoy" "C:\Program Files (x86)\VJoy\VJoy.exe" exit In Additional Apps, Add Application for closing VJoy and select "Automatically Run After Main Application" @echo off taskkill /f /im VJoy.exe exit I found that when starting an app with a batch file the reason it wasn't starting was because of spaces in the path to the .exe. That's why you put start "name of app" <-- can be anything, then path to the .exe in quotes. These 2 .bat files should do the trick and under the Launcher tab in your launchbox game is where Application Path, in your case Mortal Kombat. Edit* You can also use this method to use AHK scripts, just compile the ahk file as exe and do it the same way as above. And here's a screenshot of what I have. Edited September 5, 2016 by Sithel Link to comment Share on other sites More sharing options...
latin625 Posted September 5, 2016 Author Share Posted September 5, 2016 Thanks! I tried doing it as you said, but it will not launch Vjoy. MKKE.exe is lauched by a .bat , Simply line of code Start MKKE.exe Can that be an issue? Link to comment Share on other sites More sharing options...
latin625 Posted September 5, 2016 Author Share Posted September 5, 2016 Link to comment Share on other sites More sharing options...
Sithel Posted September 5, 2016 Share Posted September 5, 2016 I'm not sure I follow why your launching your game through the .bat and not using the Launcher tab and pointing to the game there? All these 2 bat files do is simply launch VJoy when your game launches and closes VJoy when you exit the game. 1 Link to comment Share on other sites More sharing options...
latin625 Posted September 5, 2016 Author Share Posted September 5, 2016 Yeap. Just wont launch Vjoy at all... Can attach your .bat and .ahks? Maybe I can see what I am doing wrong. Thanks! Link to comment Share on other sites More sharing options...
latin625 Posted September 5, 2016 Author Share Posted September 5, 2016 AhhhH! wait! So you are saying I dont need a bat to launch the game? I can point to the .exe? Ok, let me try this again. Brb Link to comment Share on other sites More sharing options...
Sithel Posted September 5, 2016 Share Posted September 5, 2016 Yes you use the launcher tab to launch the game. Maybe it's why VJoy is not firing off. You can also test the .bat outside of launchbox just by double clicking the the open VJoy file and it should open VJoy and the close bat should close it. open VJoy.bat kill VJoy.bat Link to comment Share on other sites More sharing options...
latin625 Posted September 5, 2016 Author Share Posted September 5, 2016 Oh HELL YEAH! Once I got rid of the .bat to launch the game it worked great! I still see the vjoy icon on the taskbar when you exit the game, but it is not running and when you mouseover it, it disappears like it it supposed to. This is awesome! I will test these two .bats on other PC games, but I think you got it solved! Thanks man!!!! 1 Link to comment Share on other sites More sharing options...
Recommended Posts