[Gambas-user] Read in EXEC..... to Rob
LB Audio
lbaudio at ...172...
Fri Oct 29 21:43:05 CEST 2004
Process_Read
doesn't work in mpg321 or mpg123 ?
....????
-------Original Message-------
From: gambas-user at lists.sourceforge.net
Date: 29/10/2004 16:44:25
To: gambas-user at lists.sourceforge.net
Subject: Re: [Gambas-user] Read in EXEC..... to Rob
On Friday 29 October 2004 17:43, LB Audio wrote:
> Hello Rob
>
> ERROR
>
> Message error in Gambas: Error -> End OF File
>
> PUBLIC SUB Process_Read()
> DIM sData AS String
> DIM l AS String
> DIM t AS String
>
> READ #LAST, sData, -255
>
> IF LAST.Id = $hprocess.Id THEN
> LINE INPUT #$hprocess, l ->>>>>>>>>>>>>>>>>>>>>>> Error
> IF Instr(l, "Time: ") THEN
> t = Mid(l, Instr(l, "Time: ") + 6, 8)
> ' do something with t now...
> label1.Caption = t
> ENDIF
> ENDIF
>
> END
What are you try to do with
> READ #LAST, sData, -255
If it works the possibility is that it read the whole $hprocess data
and nothing available for the LINE INPUT.
And as the message tells 'End OF File' it does just that.
The object LAST is the one that invokes the event.
The event is Process_Read and does for all declared process handles.
In this way Process_Read is a common event entry for 1 till n of them
and you must use the Last.ID to determine what the actions are for it.
If you have more declared Process handles it should be done
the same way as de $hprocess.id logic for the mpg321
PUBLIC SUB Process_Read()
IF LAST.Id = $hprocess.Id THEN
bla bla mpg321
ENDIF
IF LAST.Id = $hprocessother.Id THEN
READ #LAST, sData, -255
ENDIF
END
Suc6
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20041029/7b8b1003/attachment.html>
More information about the User
mailing list