Home » Community » Newbie corner » send/receive arguments to console(cmd/terminal) in GUI app
Re: send/receive arguments to console(cmd/terminal) in GUI app [message #33039 is a reply to message #33026] |
Mon, 04 July 2011 08:14   |
|
Hi Dave,
Welcome to the forum
Do I understand correctly that you want to execute command line applications from within your app? There is several ways to do that.
First option is the Sys function:int Sys(const char *cmd, String& output);
String Sys(const char *cmd); It just executes the command in cmd (which can also contain parameters, just as you would write them to cmd/xterm). The first version returns the exit code of the command and stores all the output it produces in the String output. The second variant returns the output directly (it is meant for really simple commands that never fail ).
Second option is to use LocalProcess class. It allows finer control over the executed process. You can interact with it using Read() and Write() functions. For details please refer to the documentation.
Best regards,
Honza
|
|
|
Goto Forum:
Current Time: Tue Apr 29 10:23:50 CEST 2025
Total time taken to generate the page: 0.00836 seconds
|