Jump to content
LaunchBox Community Forums

Launching with Bat files issue


Go to solution Solved by JoeViking245,

Recommended Posts

Hey hoping someone can assist me in a small issue im having when launching games via bat file. The games launch fine but i always have to click the screen with mouse once before my controller will work. I suspect its because when launching the cammand window has priority over my launched game. Does anyone have any ideas on how to remedy this? 

 

Link to comment
Share on other sites

1 hour ago, SidewaysMan said:

Hey hoping someone can assist me in a small issue im having when launching games via bat file. The games launch fine but i always have to click the screen with mouse once before my controller will work. I suspect its because when launching the cammand window has priority over my launched game. Does anyone have any ideas on how to remedy this? 

If the games Application Path is pointing to the batch file and not using an Emulator (vs the game uses an Emulator whose executable is the batch file), you should be able to remedy this by doing the following:

  • In Windows Explorer, create a shortcut to the batch file [in the same folder as the original .bat]
  • Right-click the shortcut
    • Select Properties
  • In the Shortcut Tab, change Run from Normal Window to Minimized
  • Click OK to save and close
  • Set your games Application Path to point to the shortcut (instead of the batch file)
  • Click OK to save and close
  • Launch the game and see if that resolved the issue.
Link to comment
Share on other sites

hey thanks for the response, ive tried that and still a no go. If i click with mouse on screen everything is ok, its weird, almost like the command window is sitting on top of the game window but its not. Happens even with the minimized trick, If you have any other ideas id love to try and fix this abnnoying issue bud.

Link to comment
Share on other sites

2 hours ago, SidewaysMan said:

hey thanks for the response, ive tried that and still a no go. If i click with mouse on screen everything is ok, its weird, almost like the command window is sitting on top of the game window but its not. Happens even with the minimized trick, If you have any other ideas id love to try and fix this abnnoying issue bud.

Can you share the contents of your batch file?

Link to comment
Share on other sites

  • Solution
42 minutes ago, SidewaysMan said:

Sure ill share a couple, they all open and work correctly but just have the mouse click issue before i can do anything.

Try adding start "" to the beginning.  (And pretty sure remove the @ symbol also [for asterix.bat])

start "" ..\..\Emulators\hypseus\hypseus.exe singe vldp -framefile singe\asterix\asterix.txt -script singe\asterix\asterix.singe -sound_buffer 2048 -fullscreen -gamepad -scanlines -scanline_shunt 3

(in Cyber Shadow, add it in front of the last line... start "" "%emulator_path%".....)

 

 

I assume since you have the full path to the emulator, the batch file is not located in the same folder as the emulator.  That said you may need to switch to that folder, first.

cd ..\..\Emulators\hypseus
start "" ..\..\Emulators\hypseus\hypseus.exe singe vldp -framefile singe\asterix\asterix.txt -script singe\asterix\asterix.singe -sound_buffer 2048 -fullscreen -gamepad -scanlines -scanline_shunt 3

 

 

Then if you want to make use of LaunchBox's Startup and Shutdown screens for that game (have the Shutdown screen actually show after the game exits), add a wait parameter (/w) to the start line. (don't forget the "cd" line)

start /w "" ..\..\Emulators\hypseus\hypseus.exe singe vldp -framefile singe\asterix\asterix.txt -script singe\asterix\asterix.singe -sound_buffer 2048 -fullscreen -gamepad -scanlines -scanline_shunt 3

You'll then need to do the above shortcut thing to hide the batch file command window.  

 

...which now that I think about it, those screens may have been the issue.  If you're so inclined, don't do anything I've said to do, above.   Edit one of the games and turn off the Startup/Shutdown screens.  Startup/Pause - check Override Default Start Screen Settings.  Click OK to save and close.  If that fixes it, you can then do the wait/shortcut thingy and re-enable the Startup screen (un-check override) [if you want to have them show].

Link to comment
Share on other sites

1 hour ago, SidewaysMan said:

it was the startup screen causing the issues.

If you still want to make use of the startup/shutdown screens (which can be pretty cool), you can use the wait parameter (/w).

 

To expand on the startup/shutdown screen issue, what's happening is when you launch the game (the batch file in your case), LaunchBox shows the startup screen.  The batch file launches the [actual] game then closes itself (as in the batch file 'exits').  LaunchBox sees the 'game' that it launched (again, the batch file) exited, so then shows the shutdown screen.

Adding the wait parameter causes the batch file to "hang around" until the [actual] game exits.  When you exit the actual game, the batch file then closes/exits, then LaunchBox shows the shutdown screen. 

Having the batch file 'hang around' will not use up any notable resources nor cause any slowdown/lag/stuttering/etc. of the game play.  And beauty is restored to your LaunchBox/gameplay experience. 😎

Link to comment
Share on other sites

1 hour ago, SidewaysMan said:

I tried the wait parameter but it still causes the issue with startup screen turned on. Everything fine once startup turned off. I like the startup screens so its a bummer they cause this issue.

You might try the wait parameter in conjunction with creating the shortcut. It (the 'screens') may be 'hanging up' on the Command Prompt window.

 

47 minutes ago, SidewaysMan said:

Hey Joe one more question, i play PS4 games via fpPS4 but the exit button combo doesnt work and the emulator stays open. Is their a script to add to force close that you know of?

Never looked into that emulator before.  Probably best to start a new topic specific for it.

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