w00master Posted September 7, 2024 Posted September 7, 2024 (edited) Hey Everyone- I recently obtained a set of Gun4IR lightguns. These things are so awesome and been having a blast getting my LightGuns setup. That said, because I prefer playing on the actual aspect ratio (instead of stretched), I've been using an AHK script to dynamically adjust this when a MAME game launches. The script does work in that the GUN4IR guns recognize the correct aspect ratio boundaries. However, in MAME games I run into a focus issue. Here's the AHK Script I'm using (note: I've also employed the script that removes the error/warning messages): Run, %COMSPEC% /C echo M3.1 > COM4 Run, %COMSPEC% /C echo M3.1 > COM5 WinWait, ahk_exe {{{StartupEXE}}},,60 if ErrorLevel return WinWaitActive,,,30 if ErrorLevel return Sleep 2000 SetKeyDelay, 125, 50 Send, {space 3} ~ESC:: Run, %COMSPEC% /C echo M3.0 > COM4 Run, %COMSPEC% /C echo M3.0 > COM5 ExitApp return So again, technically this works - but I run in to 2 issues: 1. When the game launches out of LaunchBox/BigBox - the MAME game window loses focus and I have to alt-tab over to the game 2. When in the MAME game, when I go into configure controls (or whatever), whenever I hit Escape, instead of going back one step in MAME, the window - again - loses focus. Strangely, this only happens once.  Here's a screencast video of all of this happening: https://app.screencast.com/przDsPsSqgQB9 Just in case, I've done the same screencast without the script portion that removes some of the warning screens in MAME (still the same behavior): https://app.screencast.com/wqNIQpyQZC03w Any help would be appreciated! Edited September 7, 2024 by w00master Quote
JoeViking245 Posted yesterday at 05:47 PM Posted yesterday at 05:47 PM On 9/7/2024 at 8:50 AM, w00master said: However, in MAME games I run into a focus issue. Did you ever find a resolution to this? (asking a year and a half later 😊) My GUN4IR is enroute and I'm going to want to do the same thing: switch between Fullscreen and 4:3, game/emulator pending. I think the losing focus issue can be resolved be setting the (4) Run commands to run minimized. (Won't know until mine arrives and I set it up) e.g.  Run, %COMSPEC% /C echo M3.1 > COM4,,Min Quote
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.