Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1791
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Dave,

Welcome to the forum Cool

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 Wink ).

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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Looking for an idea to hide cursor in SqlArray
Next Topic: Problem with GUI_APP_MAIN - example
Goto Forum:
  


Current Time: Tue Apr 29 10:23:50 CEST 2025

Total time taken to generate the page: 0.00836 seconds