Jump to content
LaunchBox Community Forums

Quit ScummVM with ESC key?


d8thstar

Recommended Posts

Then I can only assume that it's the loader that's interfering, because that should work for anything. You're literally force-closing the application when you press the associated key with that script. If the loader is what's being used as the "emulator", and it subsequently loads up another application after launching (ScummVM) it's probably not going to work as-is. You could try adding the actual process name of ScummVM in place of the "StartupEXE". So something like:

$Esc::
{
    Process, Close, ScummVM.exe
}

Exiting ScummVM works just fine for me, but I don't use the loader either.

Link to comment
Share on other sites

I tried many different combinations of your script and it isn't working for me.   Checked the process monitor while ScummVM is running and it has the app listed as http://www.scummvm.org listed and I even tried that in the script.

i used "active window info" and it is reporting ScummVM.exe

not sure what the problem is..  the loader uses bat files to launch each game, the bat file is:

@echo off
scummvm.exe --no-console -f -gNormal --path="R:\Arcade\ScummVM\games\The Dig (CD DOS)" dig

 

Edited by d8thstar
Link to comment
Share on other sites

The URL is the process description, not the process name. The process name is ScummVM.exe. The script is correct. If it's not working, it has something to do with the way the Loader functions. I just tested the script I listed above (with ScummVM.exe) and it works just fine with ScummVM by itself.

At this point you're probably going to need to talk to the loader author (which would be @epicfail if it's the one from here). Or just don't use it and import/load the games normally in LB.

I assume you've tried the Close Active Window function of Controller Automation as well? In Launchbox it's in Tools -> Options -> Input -> Automation. In Big Box it's in Options -> Controller Automation.

Link to comment
Share on other sites

  • 2 years later...

I have this exact same problem.

If you are using epicfail's approach and using the 'ScummVMImport.dll' and executing from the 'BatRunner.exe' (this is his most recent method from what I can tell),  I have a theory why it isn't working, but perhaps you can tell me if you ever resolved this.  I responded to another thread where epicfail also listed the instructions.  So I got everything working well using his instructions posted here: https://forums.launchbox-app.com/topic/51051-scummvm-games-wont-start-in-launchbox/

However, I noticed something - it seems as though the 'BatRunner.exe', after launching the .epicfail file to start ScummVM.exe, immediately quits back to LB behind the scenes.  So while the AutoHotKey for the ESC key would probably work to close ScummVM.exe, I don't think it's 'listening' for that input at that point as it has already closed out to the LB GUI (even though ScummVM is technically still running in the foreground, something I didn't catch right away)...  again, just a theory, but I too can't seem to find a fix to workaround this...

Edited by rodww
Link to comment
Share on other sites

Hi.

Because I am an idiot I answered this is the other thread mentioned above so realise you may not have seen my work around.... Sorry about that. 

So reposting here as makes more sense. 

I also couldn't get it to close using the running autohotkey script tab in Emulator, but then after changing my set up to use my arcade joystick and buttons as a mouse and keyboard (so that I don't have to fumble around for the keyboard to play these games) and building the close process into that AHK it can be done.

Using the Additional Apps, you can add an application that automatically runs before the game, and put the exit technique in there.

So make your ahk/exe with whichever key you want to exit with (only thing I have against Esc for this is that some of these games use escape as a scene skip) or you could have it so you have to hold it for 5 seconds for it to be exit and can then still use Escape in game (I decided to send Alt&F4 as that is a generic exit technique for the emulator rather than close process etc)

I have adapted the AHK to let you use Escape to skip scenes by pressing and to hold Escape key for 5 seconds to exit (checked it on my build and worked).

~Esc::
{
    keywait, Esc, t5
if errorlevel <> 0
{
Send !{F4}
Exitapp
}
}
 

 

You can then either add this Additional app to each game - fine if you only have a handful of games. However if you have lots of games you can follow the below link which can add the Additional app to all games in one platform.

Hope that works for you.

Link to comment
Share on other sites

  • 1 month later...

I added feature to the plugin that may address this.  Once you import your .bat files as roms and have them working from BatRunner.exe.  There is new option from tools that convert the batrunner roms to launch directly from Launchbox.  This bypasses the BatRunner and the .bat files.  Let me know.

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