The NEW Build Your Own Arcade Controls

Front End Support => MaLa Frontend => Topic started by: markronz on January 20, 2011, 10:27:23 am

Title: Mala Pre / Post Commands
Post by: markronz on January 20, 2011, 10:27:23 am
Please see my attached screen shot.   Is this the correct way to configure Mala's Pre and Post commands?     Theres a known problem where the mouse cursor flashes when launching nestopia.  So I was attemping to use this nomousy.exe tool to hide the mouse cursor.   However, when I run it, as i have it set up now, the pre and post commands sometimes seem to freeze on the screen.  I've attached another screenshot of the post command froze on the screen.   Any idea why this would be happening?   The pre command does seem to execute, and the mouse cursor is hidden.   But the post command just locks up Mala like this.  Any idea whats up?  Do I have anything not set up correctly?
Title: Re: Mala Pre / Post Commands
Post by: markronz on January 20, 2011, 03:16:53 pm
Ok, I have been playing with this a bit more.   It seems that the problem is directly linked to the nomousy.exe executable (attached here).    From what I can tell, the nomousy.exe file runs VERY quickly and then exits.  It seems that Mala is too slow maybe to realize that it did in fact run?    The reason I say this is, I changed the POST command to launch the windows calculator instead.   When I did this, the same "Post Command #1" screen came up.    It also froze there.   That is, it froze until I exited the calculator.   So it appears that screen is waiting for the launched executable to close.   Hopefully that makes sense.   So when I run the Post Command #1 on nomousy.exe it is apparently sitting there to wait for it to exit, even though it has already ran and completed already.

Now I was able to work around this.  The only thing I did was wrap the exe inside a batch file.  And I set my pre/post commands to launch my batch file, instead of the executable.

So my batch file simply says this in it:
Code: [Select]
start "nomousy" "C:\Emulators\nomousy.exe" /h
Exit

That solves my problem.   There is one downfall to doing it this way however.   Due to the nature of batch files...a dos window does flash on the screen when the batch file runs.   I'd really rather this not happen, if I can avoid it.   I wish there was a "hidden" option for batch files...

Anyway, loadman, let me know if you have any ideas on how to fix this.   I guess I'd like to either find a way to run that batch file and keep the dos window hidden, or else just correctly launch the exe file during the pre/post commands.    Let me know what you think!
Title: Re: Mala Pre / Post Commands
Post by: markronz on January 20, 2011, 04:38:43 pm
OK, so I have figured out one way to make this work myself.   Let me tell you how I did it, just in the off chance someone else wants to do this some day...

First I downloaded this hidden start program.  This allows you to launch bat files and keep the resulting Command windows hidden:
http://www.ntwind.com/software/utilities/hstart.html (http://www.ntwind.com/software/utilities/hstart.html)

Then I downloaded this nomousy executable that someone made to temporarily hide the mouse cursor:
http://www.autohotkey.com/forum/topic2197.html (http://www.autohotkey.com/forum/topic2197.html)

Then I made a batch file, with the following code in it:
Code: [Select]
start "nomousy" "C:\Emulators\nomousy.exe" /h
Exit

Then I set my pre and post commands for my Nintendo emulator in Mala to look like the following:
Code: [Select]
C:\Emulators\hstart.exe /NOCONSOLE "C:\Emulators\nomousy.bat"There is a screenshot of this attached below.

And it works!  Every time I launch a Nintendo game, it runs my batch file, hidden so no cmd windows pop up, and it hides the mouse from view in Nestopia.  So you don't see that unsettling mouse cursor when you launch a game.

Then when you exit the game, the script launches again, hidden again, and makes the mouse cursor reappear.

I did this because I didn't want to permanently get rid of the mouse cursor.  I still use it for administrative type stuff.   The only time I did see it when I didn't want to, was when opening Nestopia.   So I'm very happy its working now!

Loadman, if you still want to look into why the pre and post commands couldn't simply run the exe like normal, please let me know and I'd be happy to help test.  My guess is that you'd be able to duplicate the problem on your end however.