jayjay Posted March 29, 2020 Share Posted March 29, 2020 (edited) 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 November 14, 2020 by jayjay 4 2 Quote Link to comment Share on other sites More sharing options...
Darkshade Posted January 23, 2021 Share Posted January 23, 2021 Hi JayJay, After suffering from this problem for some time today, your latest focus.zip remedied it, so I just wanted to say thank you. 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted April 17, 2021 Share Posted April 17, 2021 @jayjay I have had problems with BB focus and Time Crisis 5 but thanks to the zip v10.12 you uploaded I solved. Big thanks! Quote Link to comment Share on other sites More sharing options...
Guest Posted April 18, 2021 Share Posted April 18, 2021 @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? Quote Link to comment Share on other sites More sharing options...
jayjay Posted April 19, 2021 Author Share Posted April 19, 2021 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? Quote Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2021 Share Posted April 19, 2021 It's an Arcade game but it works like a PC one. It's Time Crisis 5. It launches 2 exes. Quote Link to comment Share on other sites More sharing options...
jayjay Posted April 19, 2021 Author Share Posted April 19, 2021 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. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2021 Share Posted April 19, 2021 Thank you! Quote Link to comment Share on other sites More sharing options...
jayjay Posted April 25, 2021 Author Share Posted April 25, 2021 (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. 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: If you want to remove this plugin but you have added a "Replace" script. Enable the "Focus On Game Exit" badge: 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: 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. 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 April 25, 2021 by jayjay 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted April 25, 2021 Share Posted April 25, 2021 @jayjay I tested it with Time Crisis 5 and it works better than your previous plugin. I used the Option 3 and both LB and BB have not lost focus. Thank you so much for your magic Quote Link to comment Share on other sites More sharing options...
Kinglifer Posted December 13, 2021 Share Posted December 13, 2021 A bit dated but does this work with the latest LaunchBox? (12) I am doing a rig with bluestacks and Moonlight (So the kids can play bomb squad on old tablets) Got it all working except the loss focus issue. Just wanted to verify before I installed this. Thank you everyone. Quote Link to comment Share on other sites More sharing options...
JuRaSSiCBoY Posted December 28, 2021 Share Posted December 28, 2021 (edited) Thank you very much for your solution @jayjay I've not tried it yet but it seems like it can fix my problem with focus and gamepad not waking up after sleep mode. Using Steam to launch BigBox If I turn off my gamepad and then on or if the gamepad entered in sleep mode and I turn it on, I need to press Alt+tab to select the BigBox window to make BB to recognize it. I'm watching the BigBox screen all the time, so it was difficult to come to the conclusion that BB was losing the focus. It's weird because the keyboard never gets unresponsive. The problem is only with the gamepad. I swear this didn't happen before? Maybe Windows 10 issues?. @Jason Carr EDIT: I think I'm starting to know what's going on... seems like gamepad works for a few seconds when I wake it up and then it stops working when the Steam "XBOX Gamepad: Using JuRaSSiCBoY's settings" pop-up appears. So I think its a Steam bug. 🙈 This is not happening with the rest of Steam pop-ups... It doesn't even happen with the initial gamepad setup pop-up (just after loading BigBox). Edited December 29, 2021 by JuRaSSiCBoY Quote Link to comment Share on other sites More sharing options...
linux Posted June 6 Share Posted June 6 JayJay, I only have one PC game that causes this issue for me in my collection. I have tried focus scripts you prepared and unable to get focus without a mouse click upon game closure. I even tried a different approach by using windows task scheduler to run your script when that program terminates. When running the script manually, it works fine. Same with with windows task manually. I can't seem to figure out why the trigger I setup isn't working. That said, it would be nice if any of the scripts you wrote would just launch at the close of this game alone. I tried using the latest download you have here which have options to right click and add paths etc.. That felt more promising but I am still facing this issue in BigBox upon closing this one game every time. Not to revive such an old thread, but if you have any guidance I would appreciate it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.