Question:
Can a command prompt program be ran through a GUI program?
Mario Man X
2015-08-05 16:14:35 UTC
Clarification.

I am a MUGEN player and interested in making characters/stages. I already know about Fighter Factory but its a little difficult with some things (like applying the palette to the sprites.) and I was thinking about how it might be better to use the tools that come with MUGEN any way.

So I was thinking of the possibility of one day making my own version of Fighter Factory (I have some very basic programing knowledge.) that would be more user friendly/simple and compatible with the new MUGEN 1.1 formats.

A way of doing this, I was thinking of the possibility of making a program that uses the current MUGEN tools, (sprmake2.exe, etc.) in the background and allows the user to interact with them using a GUI layout similar to Fighter Factory. Maybe even make it so that the tools are called from a folder so the program could be easily updated.

Would this be possible to do?
Three answers:
_Object
2015-08-05 22:12:01 UTC
Yes. This is called inter-process communication (IPC), and can range from being incredibly simple to very complex. For well-designed and non-interactive programs, this falls into the category of "very simple", and can be fantastic design.



While you only need to either provide input or to read output, or you need neither, this is termed a "shell-out", and can be done very simply via 's `popen()' or 's `system()'.



When you need to provide both interactive input and read interactive output from a process, things get hairy. Shared memory or sockets (i.e., proper server-client stuff) is usually the best choice in a situation like that.



Basically, whether or not this makes sense depends on the requirements of the CLI apps. This could be really simple, or not.



It depends.
Flexon
2015-08-05 16:19:17 UTC
I don't know anything about what MUGEN or Fighter Factory is but I understand the question. Yes it's possible to run a command line program through a GUI program.



You can redirect the so called standard input and standard output from the command prompt program to your GUI program. This enables you to read what it says on the command prompt and display it in your GUI program as you wish, or to send commands to the command prompt.



The command prompt window itself can launched as a hidden window so the user won't see it.



If you told me what programming language you're using I might be able to give concrete examples.
Mario Man X
2015-08-08 18:17:26 UTC
A big thank you to both people for there answers. They are both informative. As to Flexon's question as to what programing language I would be using. If I do decide to try and make the program, then I would likely be looking into Nokia Qt Library, C, Visual Studio Express and SDL as those are what where used to make the programs that this program will be used for. (If that makes sense.)


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...