Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider becoming a contibuting member by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

Hello

I may be using this option wrong, but in the advanced setup for Mame there is a box to put in a program to run before mame runs. I am trying to put a batch file in this option. I have specified the batch file with a full path.

While trying to get this to work, I simply created a batch file with "ECHO Hello World" in it. Putting this or any other batch prevents Mame from running properly. When I select a game from within GameEx the screen turns black and then returns to GameEx. I have checked the GameEx log and it doesnt appear to be logging any errors.

Am I not properly uderstanding what this option is for or is there some precusive command syntax that I must use in this box?

What I am trying to do is setup a batch that starts an ntservice when mame opens. The batch waits for X time and then stops the service. The service is an installed VLC service that records 10 seconds of video from my webcam. I wanted to set up the GameEx screen saver to then display these snips of video when the cab is idle.

Any help would be greatly appreciated...

Edit: Oh - almost forgot. Do you know if this program runs with mame or does the mame launcher run after this other program completes? Ideally I would like it to run side by side with mame to capture the first few moments of game play.

One more thing - this works fine if I put it in the execute AFTER mame exits. But - if I leave it there, I will end up with videos of people's butts as they turn away from the cabinet. :P

-Galaxypenguin

Posted
you have to put the command "start" in front of the exe you want to launch in the batch file. read more here : http://www.robvanderwoude.com/start.html

A couple other things. If it's Vista you need a /d after start and if there's spaces (as in 'program files' in your path you need to use quotes up until you get to the executable. See below:

@echo off

start /d "c:\programs files\gameex\xpadder" xpadder.exe

exit

Good luck!

Posted
A couple other things. If it's Vista you need a /d after start and if there's spaces (as in 'program files' in your path you need to use quotes up until you get to the executable. See below:

@echo off

start /d "c:\programs files\gameex\xpadder" xpadder.exe

exit

Good luck!

Well while we're talking about it - I am doing some more complex stuff than just executing a program. I have a section that takes, for example, file file1.mgp moves to file2.mpg, file2 -> file3, etc. Its a loop Im running with an If command in the batch. After it cycles down to 0 it then starts the recording service.

If I need to do a "START" in the batch that could get funky. I was thinking of writing another batch file to call the first. Batch one = dostuff.bat, for example. Then batch2.bat contains "start batch1.bat".

Could that work??? Im sure I can make it work with a start in the original before each thing, but honestly this would be simpler.

-GP

PS - Not vista, XP, but thanks for the tip. Others who stumble on this thread may need that.

Posted

Tying up loose ends - - eventually what I ended up doing was writing a small VBS script that made my file changes and then started and stopped the service.

I had too much trouble using a 'start' before the commands I was using in the batch file - each start seemed to seperate the processes so a wait (ping nul) in a batch file waited in its own process, etc.

In the end VBS was able to do everything without seperating the processes as well as running nicely behind mame.

So now, when someone walks up to the arcade and launches mame it will record them for 20 seconds. The process keeps a finite amount of these recordings in the video folder. The GameEx screen saver is set to only play videos - and plays through these captures. I also went the extra step in created a 'video message' in other apps so you can walk up, grab the mic and leave a message that will get cycled as well.

Pretty funny actually...

:P

Posted
Tying up loose ends - - eventually what I ended up doing was writing a small VBS script that made my file changes and then started and stopped the service.

I had too much trouble using a 'start' before the commands I was using in the batch file - each start seemed to seperate the processes so a wait (ping nul) in a batch file waited in its own process, etc.

In the end VBS was able to do everything without seperating the processes as well as running nicely behind mame.

So now, when someone walks up to the arcade and launches mame it will record them for 20 seconds. The process keeps a finite amount of these recordings in the video folder. The GameEx screen saver is set to only play videos - and plays through these captures. I also went the extra step in created a 'video message' in other apps so you can walk up, grab the mic and leave a message that will get cycled as well.

Pretty funny actually...

:P

It does sound like fun!

Guest
This topic is now closed to further replies.
×
×
  • Create New...