Main > Main Forum

Anyone using 2 light guns with M2 Emulator?

Pages: << < (12/14) > >>

RamjetR:


--- Quote from: Shun on July 09, 2012, 07:50:52 am ---RamjetR,

Thanks for the quick response. Yes I get the Sega logo in the task tray and the command window pops up. Nothing happens until I close the command window down manually and then the M2 emulator auto switches to full screen and runs the borderless program perfectly (no minimising and also working with off screen shooting!). I think you may be right, I am using Windows XP and so the call to close the command window maybe different on Windows 7. Hopefully its a small tweak that needs to be made :D

--- End quote ---

No problem Shun,

The more people who test it on their cabinet and setups then the more universal I can make it.

Ok, so what I've done is change how I tell the cmd window to close. I was using a Postmessage to send the window close command through the windows message API. That's fine and for the most part it works. I've changed it back to basics and used the WinWait command to tell my program to wait until the command window exists, then tell it to close with WinClose. I tested it with both my WinXP PC and Win7. Worked fine for me... but that said, so did the last one... Depending on your front end however, it's possible that it could hide the cmd window from my program since I don't use Detecthiddenwindows. Maybe I should if this version 0.6 does the same thing for you. What front end are you using?

Appologies to BadMouth, sorry about hijacking your thread... I should start a new one, but most of the conversation has happened here now :S  I'll start a new one for the final release so it can be stickied?

******************************************************************
Version 0.6 is available here with the above (hopefully) fix. Click File>Download

Link Removed - .... Because, well... it didn't work lol ... fixed issue in V0.7

******************************************************************

Only the readme.txt and RamjetM2Borderless.exe has changed. Everything else is the same.


--- Code: ---Changelog;
V0.6 - Updated by Mark 'Ramjet' Gallon 10/7/2012
 Changed how RamjetM2Borderless detects and close's the M2emulator cmd window that is opened when the game ROM launches it. Previously used a Postmessage to close a
 particular cmd window (which was kinda cool and tricky), but may have had problems on WinXP? Took it back to basics and used WinWait to check for the cmd window and
 WinClose to close down the cmd window. Worked on my WinXP and Win7 machines. Visit the forum above to comment and give feedback.

--- End code ---

If you can try it out and give me some feedback, I'd be mega happy.

Thanks
:)
Ramjet

Oh and I did find that if your running multimonitors. The minimize problem can happen again when you shoot/click adjacent to the next monitor border. This is a Windows thing, and nothing I can do about it...  and I don't really want to capture and hold the mouse to the main game window just yet incase it breaks off screen reloading. For most if not everyone, You'll be playing this on a single screen anyway. So it's not a problem, but something I found when testing on my eyefinity setup at home. If you have multi monitors, you may still experience problems. The fix? unplug or disable the second/third screen...

Shun:

Great news, can't wait to try it out later  :applaud:

I'll test it when I get home from work tonight.
I'll make sure I keep the testing outside of my front end at first and if those tests are successful I'll try it with Maximus Arcade.  :cheers:

Shun:

Hmmm, perhaps there is something wrong with the way my PC handles this program.  :(
I tried the new version and the command window still doesn't close automatically and also the sega exe that is minimised to the task tray also stays open when the M2 emulator is closed.

Do I need any specific software like .Net installed on my system for this to work?
It's odd, because the program works great but its just the auto closing that isn't working for me on my system  :'(

RamjetR:


--- Quote from: Shun on July 10, 2012, 04:07:22 pm ---Hmmm, perhaps there is something wrong with the way my PC handles this program.  :(
I tried the new version and the command window still doesn't close automatically and also the sega exe that is minimised to the task tray also stays open when the M2 emulator is closed.

Do I need any specific software like .Net installed on my system for this to work?
It's odd, because the program works great but its just the auto closing that isn't working for me on my system  :'(

--- End quote ---

Yeah I got home late last night after seeing "Ted" at the cinema's (great movie btw!) and tried it on my native XP rig and it did the same thing. Although it worked on my vmware XP at work... I'm looking into it right now with a coffee and brought a clone of my XP machine from home to work with me to test. I'll figure this out today... for now though... just run Version 0.5 if you still have it. Link is further up in this thread. I think it's because WinXP names the title bar differently.. but I couldn't check that at work yesterday (buggers expect me to do work for some reason?).

You don't need anything specific installed... it's just running a compiled version of AutoHotKey. When compiled, it should include everything in the exe you need to run it. That's why the script skyrockets from 20kb to 1MB after being compiled. Still, it's small enough...

*** See below for update ***

Ramjet

RamjetR:

OK, nailed it this time...

Here is Version 0.7 (and yes this one will auto close the cmd window in all Win OS): Click File>Download

https://docs.google.com/open?id=0B-P3wlCiYEm3RzhCZk1NcFR3blE

Update in the changelog;

--- Code: ---Changelog;

V0.7 - Updated by Mark 'Ramjet' Gallon 11/7/2012
  Found solution to not autoclosing in WinXP in this forum thread. Many Thanks go to 'Serenity' for sharing his/her solution.
  http://www.autohotkey.com/community/viewtopic.php?t=35438
  Program should now actively close the M2Emulator cmd window in all Windows OS correctly now :)
--- End code ---

The problem appeared that in Win7 it would accept a Postmessage to close the cmd window, but WinXP wouldn't and since the cmd window also wouldn't accept an Alt-F4 (which the postmessage and winclose was sending) it wouldn't work in XP. After running a clone of my XP machine and some additional time to test (the coffee helped ALOT!) and good ol' google on my side, the autohotkey community never fail to help. Process,Close,cmd.exe was the answer.

It should work as advertised now, and unless there is significant issues or other options people would like to add. This should be the final release? Please test and give feedback :)

Also note, that this will work with almost any program. So if you have another in mind and have the same problem of incorrect minimizing during game play. It's really just adding a line of code to make it work with that game.
:D
Ramjet


Pages: << < (12/14) > >>

Go to full version