[Gambas-user] SHELL Command

Benoit Minisini gambas at ...1...
Fri Jan 9 20:03:50 CET 2004


On Friday 09 January 2004 16:26, Klaus Schumacher wrote:
> Hi,
> I've done a small program which gives some informations about the acpi
> of my laptop. The code to read the data is like the following:
>
> PUBLIC SUB Timer1_Timer()
>    befehl = "acpi -V"
>    SHELL befehl FOR READ
> END
>
> PUBLIC SUB process_write (Data AS String)
>     ' Temperatur ausfiltern
>     pos = Instr (Data, "degrees")
>     IF pos > 0 THEN therm  = Mid$ (Data, pos - 5, 5)
>
>     etc. etc.
>
> With Gambas 0.65 it has worked without problems. After I've updated to
> 0.74 it's not working anymore.
>
> Was there a change in the SHELL command, which makes it necessary to
> change my code ? Could it help to go up to 0.80 (I really don't like to
> update too much) ?
>
> Has anybody any idea ??
>
> Klaus
>
>

You can read the Changlog file to have the details of the change.
Replace Process_Write(Data as String) by Process_Read(), and use LINE INPUT 
(for example) on the process object to read its standard input:
LINE INPUT #LAST, sLine

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





More information about the User mailing list