On Mon, Dec 27, 2010 at 4:46 AM, Demosthenes Koptsis <[email protected]> wrote: > Hello and merry Christmas, > > i have these lines of code > > ----------- > sCommand = "/opt/avast4workstation-1.3.0/bin/avast -r " & > txtVirusTempFolder.Text & "/avast-report.txt" & " -ac -t A " & > txtVirusTempFolder.Text > > PRINT sCommand > > hProcess1 = SHELL sCommand WAIT FOR INPUT OUTPUT AS "AntiVirRun" > ----------- > > After that line the hProcess1 is NULL and i get NULL object in > > PUBLIC SUB AntiVirRun_Read() Drop the "WAIT" keyword. Wait makes Gambas stop and wait until the process is finished. You don't want this: you want it to run in parallel with Gambas and read its input.
Alternatively, if you just want to get the output as a string and not interact with the program, you can do Shell sCommand To someString I find often this does what I want without getting involved in the Process variable. Ian ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
