Jump to content
LaunchBox Community Forums

Recommended Posts

Posted

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!

Posted

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.

Posted

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.

111.png

Posted

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...

12.png

Posted

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

Posted
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.

  • Like 1
Posted (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 by latin625
Posted (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.

 

open-kill vjoy.PNG

Edited by Sithel
Posted

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?

23.png

Posted

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.

  • Like 1
Posted

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!!!!

  • Like 1
Guest
This topic is now closed to further replies.
×
×
  • Create New...