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++ » U++ Developers corner » evaluate command line (parse line by line processed command to create backup log)
Re: evaluate command line [message #58692 is a reply to message #58691] Sat, 23 July 2022 01:09 Go to previous messageGo to previous message
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 227
Registered: June 2011
Experienced Member
I don't get an open console window if it's a GUI app and I'm using GUI_APP_MAIN - only if it's a console app:

#include "TestDir.h"

TestDir::TestDir()
{
    CtrlLayout(*this, "Window title");
    
    String output;
    Sys("cmd.exe /c dir c:\\", output);
    
    Vector<String> lines = Split(output, "\n");
   
    String numberedOutput;

    int i = 1;
    for(auto& line : lines) {
        numberedOutput << Format("Line #%d: %s\n", i, line);
        i++;
    }
    
    lineEdit <<= numberedOutput;
}

GUI_APP_MAIN
{
    TestDir().Run();
}
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: log file in Oracle8
Next Topic: Windows 11 toolbar and menu issues
Goto Forum:
  


Current Time: Sat Sep 06 22:31:51 CEST 2025

Total time taken to generate the page: 0.07124 seconds