R
R. Stormo
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
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