[Gambas-user] about process

Benoit Minisini gambas at ...2...
Sun Nov 9 18:25:18 CET 2003


Le Vendredi 7 Novembre 2003 12:30, Edward Hsu a écrit :
> From changeLog I found that:
>
> Process.Send has been removed.
> 'Write' event Process has been replaced by 'Read' event Process, and do not
> take any argument anymore. Use READ, LINE INPUT or INPUT instead. The
> 'Error' event did not change. But in movieplayer example, the
> Process.send(" ") is still being used and works fine.

Actually, Process.Send has not been removed yet.

>
> The write event has been replaced by Read event withour argument. Could
> anyone tell me how can we get the information? Before, we use
> Process_Write(sData as string), so that we can use sData to do whatever we
> want. Without sData, how can we get data from running process? I try READ
> and Line Input and did not get anything in return.
>
> Thanks in advance for help.
>
>
>
> Regards,
>
> Edward
>

The event works this way:

SUB Process_Read()

  DIM sData AS String

  READ #LAST, sData, -1024 ' Read 1024 bytes at most.
  ' or
  LINE INPUT #LAST, sData ' Read a line, if you are sure that your process 
sends lines.

END

LAST is a reference to the process object that can be used like a File object.

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...





More information about the User mailing list