<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="IncrediMail 1.0" name=GENERATOR></HEAD>
<BODY style="BACKGROUND-POSITION: left 0px; FONT-SIZE: 12pt; MARGIN: 0px 10px 10px; COLOR: #00005b; BACKGROUND-REPEAT: repeat; FONT-FAMILY: Arial" text=#00005b bgColor=#eff3f7 background=cid:3320288B-C84A-4DE1-A19E-6ED5A60D7120 scroll=yes SIGCOLOR="0" ORGYPOS="0">
<TABLE id=INCREDIMAINTABLE cellSpacing=0 cellPadding=2 width="100%" border=0>
<TBODY>
<TR>
<TD id=INCREDITEXTREGION style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 12pt; PADDING-BOTTOM: 0px; CURSOR: auto; PADDING-TOP: 0px" vAlign=top width="100%">
<DIV>OK...OK...</DIV>
<DIV> </DIV>
<DIV>
<TABLE id=INCREDIMAINTABLE cellSpacing=0 cellPadding=2 width="100%" border=0>
<TBODY>
<TR>
<TD id=INCREDITEXTREGION style="PADDING-RIGHT: 0px; FONT-SIZE: 12pt; PADDING-BOTTOM: 0px; CURSOR: auto; PADDING-TOP: 0px; rem_PADDING-LEFT: 0px" vAlign=top width="100%">
<DIV>'Simple Code Problem</DIV>
<DIV> </DIV>
<DIV>' Gambas class file</DIV>
<DIV><BR>PUBLIC SUB Process_Read()  <BR>  DIM sLine AS String  <BR>  LINE INPUT #LAST, sLine<BR>  txt01.Text = sLine<BR>END</DIV>
<DIV> </DIV>
<DIV>PUBLIC SUB Button1_Click()  <BR>  EXEC [ "ls", "-la" ] FOR READ 'Yes - Return String in Process<BR>  'EXEC [ "mplayer","file.mp3" ] FOR READ  'Yes - Return String in Process<BR>  'EXEC [ "mpg321","-v","file.mp3" ] FOR READ  'No - Return String in Process<BR>  'EXEC [ "mpg123","-v","file.mp3" ] FOR READ  'No - Return String in Process<BR>  'Please I use mpg123 command<BR>END</DIV></TD></TR>
<TR>
<TD id=INCREDIFOOTER width="100%">
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD width="100%"></TD>
<TD id=INCREDISOUND vAlign=bottom align=middle></TD>
<TD id=INCREDIANIM vAlign=bottom align=middle></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE> </DIV>
<DIV> </DIV>
<DIV id=IncrediOriginalMessage><I>-------Original Message-------</I></DIV>
<DIV> </DIV>
<DIV id=receivestrings>
<DIV dir=ltr style="FONT-SIZE: 11pt" <i><B>From:</B></I> <A href="mailto:gambas-user@lists.sourceforge.net">gambas-user@lists.sourceforge.net</A></DIV>
<DIV dir=ltr style="FONT-SIZE: 11pt" <i><B>Date:</B></I> 29/10/2004 17:51:47</DIV>
<DIV dir=ltr style="FONT-SIZE: 11pt" <i><B>To:</B></I> <A href="mailto:gambas-user@lists.sourceforge.net">gambas-user@lists.sourceforge.net</A></DIV>
<DIV dir=ltr style="FONT-SIZE: 11pt" <i><B>Subject:</B></I> Re: [Gambas-user] Read in EXEC..... to Rob</DIV></DIV>
<DIV> </DIV>
<DIV>On Friday 29 October 2004 11:43, LB Audio wrote:</DIV>
<DIV>> Message error in Gambas: Error -> End OF File</DIV>
<DIV> </DIV>
<DIV>Not too surprising, see below...</DIV>
<DIV> </DIV>
<DIV>> PUBLIC SUB Process_Read()</DIV>
<DIV>....</DIV>
<DIV>>   READ #LAST, sData, -255</DIV>
<DIV> </DIV>
<DIV>OK, so you've read up to 255 characters from the process.</DIV>
<DIV> </DIV>
<DIV>>       LINE INPUT #$hprocess, l ->>>>>>>>>>>>>>>>>>>>>>> Error</DIV>
<DIV> </DIV>
<DIV>Now you're trying to read from the process again!  Unless it</DIV>
<DIV>returned more than 255 characters you are going to get an error.</DIV>
<DIV> </DIV>
<DIV>I suggest you remove that READ line, or put it in the ELSE block</DIV>
<DIV>of the IF LAST.Id... statement.</DIV>
<DIV> </DIV>
<DIV>Rob</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>-------------------------------------------------------</DIV>
<DIV>This SF.Net email is sponsored by:</DIV>
<DIV>Sybase ASE Linux Express Edition - download now for FREE</DIV>
<DIV>LinuxWorld Reader's Choice Award Winner for best database on Linux.</DIV>
<DIV><A href="http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click">http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click</A></DIV>
<DIV>_______________________________________________</DIV>
<DIV>Gambas-user mailing list</DIV>
<DIV><A href="mailto:Gambas-user@lists.sourceforge.net">Gambas-user@...573....sourceforge.net</A></DIV>
<DIV><A href="https://lists.sourceforge.net/lists/listinfo/gambas-user">https://lists.sourceforge.net/lists/listinfo/gambas-user</A></DIV>
<DIV> </DIV></TD></TR>
<TR>
<TD id=INCREDIFOOTER width="100%">
<TABLE cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD width="100%"></TD>
<TD id=INCREDISOUND vAlign=bottom align=middle></TD>
<TD id=INCREDIANIM vAlign=bottom align=middle></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>