AW: [Gambas-user] process.id
Benoit Minisini
gambas at ...1...
Tue May 31 15:40:28 CEST 2005
On Thursday 26 May 2005 13:26, Matthias Laur wrote:
> You have to get the output of EXEC [ "cat", "/dev/video0" ] and put it in
> the
> destination file with Gambas.
>
> Hi Benoit,
>
> how can I put it in the destination file with Gambas?
>
> Regards,
> Matthias
>
>
Open the destination file before running the process, and in the Process_Read
event, get the output of the process and write it to the file:
SUB Process_Read()
DIM sBuffer AS String
DIM iLen AS Integer
iLen = Lof(LAST)
READ #LAST, sBuffer, iLen
WRITE #hFile, sBuffer, iLen
END
When the process is terminated, close the destination file.
SUB Process_Kill()
CLOSE #hFile
END
Regards,
--
Benoit Minisini
mailto:gambas at ...1...
More information about the User
mailing list