how to create my own spriteclub mugen
hello,  I'm trying to create an application that does the same as spriteclub and executes consecutive automatic battles, save them in database and all that.

I know how to do it but only with 1v1 and 2v2simul combat, I do it through argv with the .bat but I'm limited, as you did to be able to execute any type of combat, and also that it does not close Mugen.

I know you do not have to answer my questions, but I've been trying to find out how to do it and I can not find a way. My programming skills are mid.
Thank you anyway
A Greeting
This thread might help you along a bit, specifically the source code for the watcher:

For the questions in specific it's a bit hard to answer without knowing exactly what you're after.
SpriteClub is run by starting mugen from the console (i.e. using .bat files, essentially). It will close mugen automatically if you just set a round limit in the arguments by saying -rounds 3, for example.
For running any type of match... that's a lot harder. I wager that you mean turns, yes? SpriteClub achieves this by literally starting mugen and navigating the menu as if it is a human. In order to allow it to do so it will go and rewrite the select.def file according to the characters that should be picked (as you don't want to load nor navigate a 9000+ character roster selection screen) Unfortunately, there isn't an easier solution for this problem.
OK thanks for everything . Already before reading this I had already done a program in C # to do this in 2 different ways, one by imputsimulater simulating human behavior of keyboard, and another with direct pointers address that is much easier. I have found a 3rd option that is modifying the mugen client with reverse engineering and the truth that is much better.
Thanks you . 
a greeting Nunoi.