wxExecute

From WxWiki
Jump to navigation Jump to search

See also: WxProcess

If you don't want a terminal window to pop up when synchronously executing a command, do it like this:

 wxArrayString output;
 wxArrayString errors;
 wxExecute (command, output, errors);

Simple as that. You may inspect output and errors to see if there was anything interesting there, but you don't need to.

For doing the same while launching applications asynchronously, you'll probably have to fiddle with wxProcess (and especially wxProcess::Redirect). Don't hesitate to add your findings here :).



Programtically Launching Explorer and selecting a file

The following command under windows: Opens a window view with the specified folder, file, or program selected.

   #ifdef __WXMSW__		 
       wxExecute(wxString::Format("explorer.exe /select,%s", fullPath.c_str()));
   #endif

Links