w00master Posted September 10 Share Posted September 10 Honestly confused on this. Never seen this type of error message before. It doesn't effect the playing of the game, but the error message always takes focus away from it so I end up having to "alt-tab" over to the game. This happens both in LaunchBox and BigBox. So here's what's happening. Anytime, I play Area 51 (for example) through Launchbox, I get this error (see screenshot). However, if I run the same rom directly in MAME, I don't get this window error. I believe it may have something to do with the running script I have (this script is standard for this game for anyone that uses Gun4IR): Run, %COMSPEC% /C echo M3.1 > COM1 Run, %COMSPEC% /C echo M3.1 > COM2 ~ESC:: Run, %COMSPEC% /C echo M3.0 > COM1 Run, %COMSPEC% /C echo M3.0 > COM2 ExitApp return The error message is only commenting on the bezel art. (But strangely, when the game loads the bezel art shows up)? Ultimately, how do I get rid of these windows? It constatly takes away focus from the game. Any help would be very much appreciated. Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted September 10 Share Posted September 10 4 minutes ago, w00master said: The error message is only commenting on the bezel art. (But strangely, when the game loads the bezel art shows up)? Ultimately, how do I get rid of these windows? In LaunchBox, edit you MAME emulator. Check the box for Attempt to hide console window on startup/shutdown. Quote Link to comment Share on other sites More sharing options...
w00master Posted September 10 Author Share Posted September 10 Thanks @JoeViking245!!! That did get rid of the warning console windows, but unfortunately I still have the "focus" window issue - game loads behind Launchbox, and have to alt-tab over. Here's a screencast of what happens: https://app.screencast.com/vSZAcybCMHFOC Am I SOL? LOL 1 Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted September 10 Share Posted September 10 32 minutes ago, w00master said: That did get rid of the warning console windows, but unfortunately I still have the "focus" window issue - game loads behind Launchbox, and have to alt-tab over. If what I'm thinking is correct, for that you'll need to either start MAME fullscreen or turn off the Startup Screen for the emulator. Quote Link to comment Share on other sites More sharing options...
w00master Posted September 10 Author Share Posted September 10 Sounds good. I do know my MAME instance is set to open full screen. I will check on the other one. Quote Link to comment Share on other sites More sharing options...
w00master Posted September 11 Author Share Posted September 11 1 hour ago, JoeViking245 said: If what I'm thinking is correct, for that you'll need to either start MAME fullscreen or turn off the Startup Screen for the emulator. So, I tried this out, unfortunately I'm still seeing the same issue. I really believe it's the AHK script that's taking priority over MAME. I'll post this on AHK forums, but any ideas? Thanks! Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted September 11 Share Posted September 11 29 minutes ago, w00master said: So, I tried this out, unfortunately I'm still seeing the same issue. I really believe it's the AHK script that's taking priority over MAME. I'll post this on AHK forums, but any ideas? I not sure you'll get much help there for this particular situation. You could try this: Run, %COMSPEC% /C echo M3.1 > COM1 Run, %COMSPEC% /C echo M3.1 > COM2 Process, Wait, mame.exe ;Sleep 2000 WinActivate ~ESC:: Run, %COMSPEC% /C echo M3.0 > COM1 Run, %COMSPEC% /C echo M3.0 > COM2 ExitApp return Try it without the sleep timer. If it doesn't work, uncomment that line. Quote Link to comment Share on other sites More sharing options...
w00master Posted September 11 Author Share Posted September 11 Thanks mate. Unfortunately, this doesn't work as well. However, (on the bright side), I did notice it working for me.... once. I moved the script to the top, however - the moment (I believe) the com commands go off, I lose focus. I tried moving that portion of the script further down, but this didn't take either. Appreciate the help - I'll keep digging. It's pretty assuredly something about executing the script (maybe it's the COM commands? Perhaps someone on here that uses Gun4IR"? Thanks! Quote Link to comment Share on other sites More sharing options...
Solution JoeViking245 Posted September 11 Solution Share Posted September 11 1 hour ago, w00master said: I did notice it working for me.... once. That's a good sign. Try adding a 3 second timer before Process, Wait... Giving the com commands a few moments to settle in. If it still doesn't work, move the 1st 2 com commands into their own script and add that as an Additional App for the games and set them to Run Before Main App. Try it on one or two and if it works, there's a plugin where you can bulk add Additional Apps to all the games [that need it]. Quote Link to comment Share on other sites More sharing options...
w00master Posted September 11 Author Share Posted September 11 (edited) 50 minutes ago, JoeViking245 said: That's a good sign. Try adding a 3 second timer before Process, Wait... Giving the com commands a few moments to settle in. If it still doesn't work, move the 1st 2 com commands into their own script and add that as an Additional App for the games and set them to Run Before Main App. Try it on one or two and if it works, there's a plugin where you can bulk add Additional Apps to all the games [that need it]. Thanks so much for your help. You're correct. You led me in the right direction. After your feedback, and learning about IfWinExist as well as those functions REQUIRING some sort of loop, this is what solved for me. Here's the revised script. This should work for anyone using Gun4IR and MAME: (Note: place below script in "Running Scripts" for your MAME Emulator in Launchbox.) Run, %COMSPEC% /C echo M3.1 > COM1 Run, %COMSPEC% /C echo M3.1 > COM2 SetTitleMatchMode, 2 loop { ifWinExist, ahk_class MAME { WinActivate ahk_class MAME WinActivate ahk_class MAME } Sleep, 100 } Return ~ESC:: Run, %COMSPEC% /C echo M3.0 > COM1 Run, %COMSPEC% /C echo M3.0 > COM2 ExitApp return Hope this helps anyone else! Edit: anyone wanting to use this script, the only thing you need to change in the above are the COM numbers for your Gun4IR. Beyond that, nothing else needs to be changed. Edited September 11 by w00master 1 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.