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 » Developing U++ » UppHub » Added SysExec package
Re: Added SysExec package [message #18924 is a reply to message #16047] Fri, 31 October 2008 23:38 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3437
Registered: August 2008
Senior Veteran
Sorry mdelfede

From then I have done some functions. Some of them are in http://www.ultimatepp.org/forum/index.php?t=msg&th=3942& amp;.

Between them I have included these functions:

// LaunchFile("Sheet.xls") will open the file with the program asigned by default to open xls files
bool LaunchFile(const String& file);

// LaunchCommand("mplayer myclip.avi", MyCallback) will launch the command line program with args without opening a window, and all the output will be sent to MyCallback(String &) function
int LaunchCommand(const char *cmd, void (*readCallBack)(String &));

// LaunchCommand("mplayer myclip.avi",str) will do the same but sending the output to String str
int LaunchCommand(const char *cmd, String &ret);

The LaunchCommand functions are based in the second sample code included in the August post.

I am using them extensively in funtions working with mplayer, mencoder, ffmpeg, sox and other for a program that handles video and audio (see a screenshot in the post I have included above).

These functions parse the output of the command by "readCallBack" that handles a progress bar and a command window (in the screenshot), this one just for debugging, but goes very well. The functions work well in Windows and Linux.

I want to do a higher level class to handle extern processes in a very simple way and with progress handling included.

Best regards
Koldo



Best regards
IƱaki
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [SOLVED] Control4U_demo cannot close ?
Next Topic: Job package: A lightweight worker thread for non-blocking operations.
Goto Forum:
  


Current Time: Fri Jun 06 09:00:42 CEST 2025

Total time taken to generate the page: 0.04610 seconds