Jump to content
LaunchBox Community Forums

Big Box isn't regaining Window Focus after game exit


Recommended Posts

On 1/22/2018 at 6:54 PM, damageinc86 said:

There's another thread about focus, but taskbar related.  I don't know what to do about this, but I've had focus problems since day one.  Except mine is always the taskbar showing up and staying visible even when I do click back into big box. 

did you ever work this out?

 

On 5/6/2019 at 2:24 PM, kaichou said:

OK, finally had time to come back to this.  This didn't seem the fix the focus issue.  I exit any Gamecube/Dolphin game, and it doesn't return focus to BigBox.  :( I'll keep searching google, but if you have any other ideas...

This might be the same losing focus issue I'm experiencing.
 

On 4/24/2019 at 8:56 PM, jayjay said:

RegainFocus.zip 2.48 kB · 5 downloads

Download this.

Right click on the zip file, properties and choose "Unblock".

Put the dll in plugins folder.

put .ahk in autohotkey directory.

Start a game in LB/BB.

Exit the game.

If you get a message box pop up that says "Hello".

Replace the .ahk with this one.

RegainFocus.ahk 391 B · 4 downloads

I think the issue is, the original .ahk had "Launchbox" but should be "LaunchBox"

This worked to not bring the taskbar up however I still have to physically click somewhere in BigBox. I'm using GameLoader ALL RH at the moment.

The following option fixed BigBox taskbar pop-up but its not available in newer versions so now BigBox taskbar pops up and also other emulators (I just dealt with but now I'm using others more so its annoying)

image.png.0ef92db639272d22dbd5caf6ed426d7c.png

Edited by wallmachine
Link to post
Share on other sites
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#WinActivateForce
SetTitleMatchMode, 2
;Sleep, 2000
WinActivate, LaunchBox
ExitApp
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#WinActivateForce
SetTitleMatchMode, 2
;Sleep, 2000
WinActivate, LaunchBox
PostMessage, 0x112, 0xF030,,, LaunchBox
ExitApp
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#WinActivateForce
SetTitleMatchMode, 2
;Sleep, 2000
WinActivate, LaunchBox
WinMaximize, LaunchBox
ExitApp
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#WinActivateForce
SetTitleMatchMode, 2
;Sleep, 2000
WinRestore, LaunchBox
ExitApp

Try some of these. You might want to try mixing up the window commands. Other than that im out of idea's.

Edited by jayjay
Link to post
Share on other sites
20 hours ago, wallmachine said:

The following option fixed BigBox taskbar pop-up but its not available in newer versions so now BigBox taskbar pops up and also other emulators (I just dealt with but now I'm using others more so its annoying)

image.png.0ef92db639272d22dbd5caf6ed426d7c.png

Is there a reason to use the latest release? I dont know why this option was removed, we need it back.

I would revert back to the last version before it was removed.

Link to post
Share on other sites
4 minutes ago, Juzzotec said:

Is there a reason to use the latest release? I dont know why this option was removed, we need it back.

I would revert back to the last version before it was removed.

Yeah I tried reverting but none of the downloads on the first page work... emucr some files it seems like people have played with and added different virus on some releases that I've grabbed. (not the normal virus it gets prompted for)

Edited by wallmachine
Link to post
Share on other sites

I had this problem and managed to find a fix that works for me, at least for Retroarch.  In the manage emulators option under tools select edit under Retroarch and select the Game Startup Screen tab and check the box "Hide all windows that are not in exclusive fullscreen mode" Hope this helps someone.

  • Thanks 1
Link to post
Share on other sites
  • 11 months later...
On 5/10/2019 at 6:23 AM, Azalis said:

I had this problem and managed to find a fix that works for me, at least for Retroarch.  In the manage emulators option under tools select edit under Retroarch and select the Game Startup Screen tab and check the box "Hide all windows that are not in exclusive fullscreen mode" Hope this helps someone.

Just want to say thank you! This solution worked for me when I was having focus issues with Supermodel 3.

Link to post
Share on other sites
  • 2 months later...

I know this is an old thread, but I had the same issue with the Microsoft Store version of Killer Instinct.  I happen to own Minecraft for Windows 10 as well and it has the same problem on my setup.  I have spent a few days searching around the forums and none of the previous solutions worked.  The "regainfocus" plugin from jayjay seemed promising, but it didn't work either for some reason.  Possibly the dll file in the plugin isn't detecting when the UWP app is closed.

The workaround I came up with is to create an ahk script that captures the ID of the active window and then waits for it to close.  Once the game/window is closed, it will run the ahk commands from jayjay's plugin to Activate Launchbox/BigBox.  Below is the script that I cobbled together:

Sleep, 3000 ; Wait three seconds for the game to launch
MouseMove, 1920, 500 ; move the mouse to the middle of the screen instead of the corner to prevent the title/start bar from appearing
Sleep, 10000 ; wait 10 seconds for good measure to make sure the game is loaded and is the active window, this could probably be reduced
WinGet, active_id, ID, A ; get the ID of the active window
WinWaitClose, ahk_id %active_id% ; wait for the active window to close
Sleep, 500 ; wait half a second, this might not be needed either
if WinExist("LaunchBox Game Startup")
{
	WinActivate
	WinWaitClose, LaunchBox Game Startup
}

if WinExist("LaunchBox")
{
	WinActivate
}

if WinExist("LaunchBox Big Box")
{
	WinActivate
}

ExitApp

So below are the full steps that I took to fix my focus issue with Killer Instinct and Minecraft for Windows 10:

1. Download and install the full version of AutoHotkey, which has the functionality to compile an ahk script into an exe

2. Save the above script commands as a new ".ahk" file

3. Right-click on the file and select Compile Script, which will output a ".exe" file with the same filename

4. In Launchbox, edit the Windows Store/UWP game that has this issue and navigate to "Additional Apps"

5. Select "New Application", give it a name and browse to the ".exe" file created in step 3.

6. Check the "Automatically Run Before Main Application" box and hit OK

 

Since it took me a couple days to find a fix, I wanted to post this just in case it helps someone in the future.

  • Like 1
Link to post
Share on other sites
  • 7 months later...
On 7/9/2020 at 8:32 PM, DrGrizzPHD said:

I know this is an old thread, but I had the same issue with the Microsoft Store version of Killer Instinct.  I happen to own Minecraft for Windows 10 as well and it has the same problem on my setup.  I have spent a few days searching around the forums and none of the previous solutions worked.  The "regainfocus" plugin from jayjay seemed promising, but it didn't work either for some reason.  Possibly the dll file in the plugin isn't detecting when the UWP app is closed.

The workaround I came up with is to create an ahk script that captures the ID of the active window and then waits for it to close.  Once the game/window is closed, it will run the ahk commands from jayjay's plugin to Activate Launchbox/BigBox.  Below is the script that I cobbled together:


Sleep, 3000 ; Wait three seconds for the game to launch
MouseMove, 1920, 500 ; move the mouse to the middle of the screen instead of the corner to prevent the title/start bar from appearing
Sleep, 10000 ; wait 10 seconds for good measure to make sure the game is loaded and is the active window, this could probably be reduced
WinGet, active_id, ID, A ; get the ID of the active window
WinWaitClose, ahk_id %active_id% ; wait for the active window to close
Sleep, 500 ; wait half a second, this might not be needed either
if WinExist("LaunchBox Game Startup")
{
	WinActivate
	WinWaitClose, LaunchBox Game Startup
}

if WinExist("LaunchBox")
{
	WinActivate
}

if WinExist("LaunchBox Big Box")
{
	WinActivate
}

ExitApp

So below are the full steps that I took to fix my focus issue with Killer Instinct and Minecraft for Windows 10:

1. Download and install the full version of AutoHotkey, which has the functionality to compile an ahk script into an exe

2. Save the above script commands as a new ".ahk" file

3. Right-click on the file and select Compile Script, which will output a ".exe" file with the same filename

4. In Launchbox, edit the Windows Store/UWP game that has this issue and navigate to "Additional Apps"

5. Select "New Application", give it a name and browse to the ".exe" file created in step 3.

6. Check the "Automatically Run Before Main Application" box and hit OK

 

Since it took me a couple days to find a fix, I wanted to post this just in case it helps someone in the future.

This worked, thank you !!!

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