Jump to content
LaunchBox Community Forums

AutoHotKey fro PC games


latin625

Recommended Posts

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

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...