Jump to content
LaunchBox Community Forums

Is there a way to call a batch script when you RETURN to LaunchBox from a game?

Recommended Posts

I know you can launch an external program or script whenever you run a game, but is there a way to call one whenever you exit a specific emulator or game? For context, I'm trying to create a workaround for emulators that don't have a feature to load a specific control configuration for a specific game (in my case, Demul). My plan is to copy over a specific config file when I load the game. But when I exit the game, I'd like to copy back a config file that would act as a default, of sorts (seeing as how I don't need a specialized input scheme for every game). 

Link to post
Share on other sites

If you have just few games you need to do this for, you can add an Additional Application for them.  Actually 2 Additional apps. One, you select to Automatically Run Before Main Application (copy over a specific config file). And then a 2nd one to Automatically Run After Main Application (copy back the default config file).

If you need to do this for Every game (or more than "a few") that uses a specific emulator (Demul), the easiest way is to create a "new emulator" that's actually a script (via AutoHotkey [or a batch file if you prefer]).  This script will Copy the config, Launch the game, 'Uncopy' the config.  This one's a bit more tricky because you'd need to somehow tell it which specific config to copy based on the game being played.  "Tricky", but very doable.

For either case, if you use an AutoHotkey (AHK) script, it will need to be compiled to an .exe.

3 hours ago, NagakiriHidechi said:

I don't need a specialized input scheme for every game

In this case, you have those games use your original Demul emulator (or no Additional Apps).


Link to post
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.

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