Jump to content
LaunchBox Community Forums

Any way to hide extra windows/the emulator until the game is launched in bigbox?


Ell

Recommended Posts

I'm trying to make my htpc as seamless as possible with little to no reminders that I'm actually in windows, and the extra windows when launching things is pretty annoying. In dolphin when I launch a game, I always see the main dolphin window for 1-3 seconds before the game launches and goes full screen. I would like to hide it if possible. I managed to hide the extra windows you see when closing the emulator with this in the autohotkey section of the emulator config:
$Esc:: { WinActivate, LaunchBox Big Box Process, Close, {{{StartupEXE}}} }
but haven't been able to figure out a way to hide the window that pops up when you start a game. And in nullDC/demul it's a similar problem, it shows the main window of the emulator for a few seconds before it loads the game and maximizes. Anyone know of a solution for this?
Link to comment
Share on other sites

Yeah, I figure if there's a solution it's probably an autohotkey workaround thing. Maybe delaying focus for the window for x amount of time. But my autohotkey skills are not that strong and have no idea how to do that.
Link to comment
Share on other sites

After much trial and error I figured it out. Here's how I did it in case someone else finds it helpful.
DetectHiddenWindows, On DetectHiddenText, On Run, Dolphin.exe "%1%" "%2%", , Hide Sleep 3000 WinShow, Dolphin WinActivate, Dolphin $Esc:: { WinActivate, LaunchBox Big Box Sleep, 100 Process, Close, Dolphin.exe ExitApp }
Saved as dolphinlauncher.ahk and made in to dolphinlauncher.exe, with autohotkey, put in same directory as Dolphin.exe. In Launchbox make dolphin point to dolphinlauncher.exe, launch options "-b --exec=" with "no space before rom" checked. Nothing in the ahk section of launchbox. Works great, should be able to adapt it to other emulators pretty easily. Might need to adjust the sleep depending on how fast or slow your computer it.
  • Like 1
Link to comment
Share on other sites

Turns out that script doesn't work for demul because it refuses to actually launch the game until it's the focus window. But I found a workaround for it, if you open Demul.ini and change windowX, and windowY to a high number it will launch directly in to the game instead of showing the main window first. For example mine is:
windowX = 9999 windowY = 9999
I think maybe this is the window location and because it's a high number it appears off screen, but I'm not sure.
Link to comment
Share on other sites

  • 2 months later...

I successfully used the below code as an AHK script (the above code didn't have proper line breaks).


DetectHiddenWindows, On

DetectHiddenText, On

Run, Dolphin.exe "%1%" "%2%", , Hide Sleep 3000

WinShow, Dolphin

WinActivate, Dolphin

$Esc::

	{

		WinActivate, LaunchBox Big Box Sleep, 100

		Process, Close, Dolphin.exe

		ExitApp

	}

 

Edited by Dormat
Link to comment
Share on other sites

hey updated script to also hide mouse and taskbar and restore on exit works really well 


DetectHiddenWindows, On



DetectHiddenText, On



;hidemouse

 If (BlockMouse := !BlockMouse) {



      MouseMove 9999,9999,0

      BlockInput MouseMove

	  

    } Else {

      

	  BlockInput MouseMoveOff

      MouseMove -A_ScreenWidth/2,-A_ScreenHeight/2, 5, R

    }

;hidetaskbar

If WinExist("ahk_class Shell_TrayWnd")

	{

		WinHide, ahk_class Shell_TrayWnd

		WinHide, Start ahk_class Button

	}



;hidedolphinwindow

Run, Dolphin.exe "%1%" "%2%", , Hide Sleep 3000



WinShow, Dolphin



WinActivate, Dolphin



$Esc::



	{



		WinActivate, LaunchBox Big Box Sleep, 100

		WinShow, ahk_class Shell_TrayWnd

		WinShow, Start ahk_class Button

	

		Process, Close, Dolphin.exe

             	MouseMove A_ScreenWidth/2,A_ScreenHeight/2

		ExitApp



	}

 

Edited by Ztox
Link to comment
Share on other sites

  • 4 months later...

This is totally doable without AHK, so you can use this with other frontends as well.  Here's how I did it:

  1. In Dolphin: Graphics Configuration -> un-tick Render to Main Window
  2. Create Dolphin.vbs in Dolphin's folder, with this in it:
    
    scriptFolder = Left(WScript.ScriptFullName,InstrRev(WScript.ScriptFullName,"\")-1)
    
    Set shell    = CreateObject("WScript.Shell")
    
    Set regex    = New RegExp
    
    Dim args()
    
    regex.Pattern = "^[\/\-]"
    
    
    
    For i = 0 to WScript.Arguments.Count-1
    
    	ReDim Preserve args(i)
    
    	If regex.Test(WScript.Arguments(i))	Then
    
    		args(i) = WScript.Arguments(i)
    
    	Else
    
    		args(i) = """" & WScript.Arguments(i) & """"
    
    	End If
    
    Next
    
    
    
    shell.Run scriptFolder &  "\Dolphin.exe " & Join (args), 2

     

  3. In LaunchBox, change Dolphin's Emulator Application Path to C:\Windows\System32\wscript.exe and the Default Command-Line Parameters to X:\Path\to\Dolphin\Dolphin.vbs /b /e

The most important bits are the "Render to Main Window" option, which lets you use a different window activation/show state than the one you want to use for the games, and the "2" at the very end of the script which tells Dolphin to launch "Minimized but active".  I'd use Powershell, except it's got the same problem as Dolphin, with the annoying window popups!

 

Edited by Shaeree
Link to comment
Share on other sites

  • 1 year later...
  • 6 months later...

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