Q:show output from script

From: R. Stormo (anti_rohnny_at_spam_stormweb.no)
Date: 01/09/05

  • Next message: wiza: "how to complile cgal by borland c++ build"
    Date: Sun, 09 Jan 2005 14:28:11 +0100
    
    

    I have a problem showing output that is comming from a script.
    If I make a script running at commandline it do work and everything
    are showing.
    But when I try to execute it from within my proggy it would not show.
    I have tried to save the outout to a file and again, when I runit from
    commandline it do save everything but from software it would not.
    It do only show things that are outputed with "echo"

    My routine for showing the file are, the execute script rutine are the same.

     FILE *fp; //The filePIPE
     char message[1024]; //Declare buffer to hold the file
     fp = fopen( myfilename, "r" );//Read read in txt mode
     if ( fp==NULL )
      msgbox("could not open file to read !!!", "Warning");//Show File not
    found!
     else
     {
      while( !feof( fp ) ) //check for EOF
      {
       fgets( line, 128, fp ); //Read 128 bytes
             strcat( message, line ); //Add this line to previous buffer
      }
      fclose(fp); //Close the filePIPE
      //------------------------------
      // Show the output in a dialogbox on screen
      //------------------------------
      eMessageBox msg(message, "OUTPUT", eMessageBox::iconInfo
    eMessageBox::btOK);
      msg.show(); msg.exec(); msg.hide();

     }

    In advance, thanks


  • Next message: wiza: "how to complile cgal by borland c++ build"

    Relevant Pages

    • Re: Q:show output from script
      ... > I have a problem showing output that is comming from a script. ... > commandline it do save everything but from software it would not. ... posting here, use a standard function, e.g.: ...
      (comp.lang.cpp)
    • Re: Q:show output from script
      ... > I have a problem showing output that is comming from a script. ... > commandline it do save everything but from software it would not. ... C++ Faq: http://www.parashift.com/c++-faq-lite C Faq: http://www.eskimo.com/~scs/c-faq/top.html alt.comp.lang.learn.c-c++ faq: ...
      (comp.lang.cpp)
    • Re: Terminating processes owned by other users on a Terminal Serve
      ... Well, there's not much of an issue with using the commandline per se; if it works, it works, and the ts* utilities were specifically designed to work well on a Terminal Server. ... WMI scripts always behave slightly differently when you're running them locally - you can't authenticate local WMI scripts using distinct credentials - so I suspect that the script simply doesn't get some privileges that it normally would. ... I didn't even try it because I knew tskill would work and I frankly couldn't remember how to jump through all the privilege setup hoops to test it. ...
      (microsoft.public.scripting.wsh)
    • O2K vbe error message "Cant find project or library"?
      ... even though my original versions showing up okay. ... I'm have trouble with a script in my O2K. ... strMsg = "Do you want to run the macro to expand all the ...
      (microsoft.public.outlook.program_vba)
    • Re: Looking for file transfer tool with XMODEM on Linux
      ... >> Can't you just call minicom from a bash script? ... with the right commandline arguments ... > modem is just sitting around and waiting for a call from a remote station. ...
      (comp.os.linux.misc)