Jump to content
LaunchBox Community Forums

Recommended Posts

If you have a black screen when exiting games or BB/LB is unresponsive until you alt - tab back to BB/LB it might be because BB/LB has lost focus.

This plugin will run an ahk script on game exit. The ahk script will then activate BB/LB, bringing it back into focus.

Is compatible with shutdown screens.

I dont have any steam games but Im sure I have seen it mentioned that LB doesn't know when steam games have exited so might not be compatible with steam games or any similar type of games.

 

For LB version 10.11 and below:

Download this: focus 10.11.zip

Unblock it.

Put RegainFocus.ahk in Launchbox/AutoHotkey.

Put AhkOnExit.dll in Launchbox/Plugins.

 

For LB version 10.12 and above:

Download this: focus 10.12.zip

Unblock it.

Put RegainFocus.ahk in Launchbox/ThirdParty/AutoHotkey.

Put AhkOnExit.dll in Launchbox/Plugins.

If you are already using the 10.11 version, which is scattered around these forums somewhere. You will be getting an exemption, on game exit, when you have updated to LB version 10.12. Just replace the AhkOnExit.dll with the 10.12 version.

 

for LB version 11.7(?)

focus.zip

 

Update to the plugin found here:

LaunchScript.zip

Edited by jayjay
  • Thanks 3
  • Game On 2
Link to post
Share on other sites
  • 2 months later...
  • 2 months later...
13 hours ago, nohero said:

@jayjay

it happens ( not always ) when exit game BB doesn't respond and I need to click on mouse button.

Do you know how to fix it?

Sometimes when launching from a .exe, that .exe will then launch another .exe at which point LB will assume the game has quit and the plugin will launch the ahk while the game is still running. 

If that's not the case I'm not entirely sure why it isn't working correctly. Activating windows to bring them to the front can be a bit finicky at times.

What game isn't working correctly? Is it a steam or gog game or what? 

Link to post
Share on other sites
7 hours ago, nohero said:

It's an Arcade game but it works like a PC one. It's Time Crisis 5.

It launches 2 exes.

Looking at time crisis 5 files, I assume it first launches "RSLauncher.exe" then launches "TimeCrisisGame-Win64-Shipping.exe".

At the weekend I'll make a plugin that will attempt to focus BB on game exit when playing a game that launches multiple exes. 

  • Thanks 1
Link to post
Share on other sites
Posted (edited)

Iv updated this plugin, I haven't much time to test so it will need some proper testing.

Focus On Game Exit.zip

Download it.

Right click, properties, unblock.

Extract the folder to Launchbox/Plugins.

It has the original focus plugin built in but now has the option to override the original plugin on a per game basis. The focus being on games that uses launcher exe's.

 

Right click on a game and select "Focus On Game Exit".

 

Option 1 - Replace:

Theoretically this should work with shut down screens. But don't hold me to it.

Untitled.thumb.png.7149639de2988385a9e797202d2d22b0.png

Exe1 - this needs to be the 1st .exe the game uses.

Wait - this is the amount of time, in seconds, to wait between... when the 1st exe closes and the 2nd exe launches. Its a delay to give the 2nd exe time to "properly open".

Exe2 - this needs to be the secondary exe.

Make sure Exe1 and Exe2 are spelt exactly the same as the games exe's. Including upper and lower case letters.

IMPORTANT NOTE: this method comes with a major downside. The way this option works is by replacing the  games  launcher exe with an autohotkey script. This means that this option isnt compatible with portable LB setups. It also means that at any point, if you delete this plugin's directory you cannot restore the games original exe path... this path:

220184699_Editwindow.thumb.png.630b28f7797648d8cc978464b5b921f3.png

If you want to remove this plugin but you have added a "Replace" script. Enable the "Focus On Game Exit" badge:

Untitled2.thumb.png.fe264229baf05fa988f1ecd71a992be2.png

This will make it easy to track down games that uses this plugin.

Right click on the game and select "Focus On Game Exit" and press the delete button to restore the "Default Path".

The default path... this:

Untitled.thumb.png.770731c0455a6f872ea779a5c7807b94.png

The ONLY time you need to change this path is if you move the associated game files. Otherwise dont change it at all.

If using this option, you do so at your own risk. 

 

Option 2 - Window;

Wont work with shutdown screens.

Untitled3.thumb.png.7dd2d919e24e24c3738ff4b331707f60.png

Window 1: this is the games launcher window title.

Wait. How many seconds to wait before the 2nd window opens. This is also a timeout (which may need more work). If the 2nd window doesn't open for whatever reason the timeout will elapse and should close the script.

Window 2: the games secondary window title.

Both window options need to be spelt exactly the same as the games window titles.

This hasnt been tested a great deal.

 

Option 3 - EXE:

Wont work with shutdown screens.

This option is the same as option 1 but it will not replace the games path in LB.

The "wait" option, like option 2 is also a time out.

 

To recap:

Option 1 modifies LB data, use at your own risk.

Options 2 and 3, does not modify LB data.

 

Options 2 and 3, the ahk scripts could prob use some work. Can find the scripts in the plugin directory. If anyone has any suggestions for the scripts then let me know.

Consider this a beta, I would suggest not adding the override scripts to a load of games til it has been properly tested.

Edited by jayjay
  • Thanks 1
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.

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