Re: [Gambas-user] hProcess is NULL

2010-12-27 Thread Demosthenes Koptsis
Thank you guys for the help. On Mon, 2010-12-27 at 23:38 +1100, Ian Haywood wrote: > On Mon, Dec 27, 2010 at 10:00 PM, Demosthenes Koptsis > wrote: > > > hProcess1 = SHELL sCommand FOR INPUT AS "AntiVirRun" > > WHILE (hProcess1.Running) > > WAIT 10 > > WEND > This does work but is slow, pote

Re: [Gambas-user] hProcess is NULL

2010-12-27 Thread Ian Haywood
On Mon, Dec 27, 2010 at 10:00 PM, Demosthenes Koptsis wrote: >  hProcess1 = SHELL sCommand FOR INPUT AS "AntiVirRun" >  WHILE (hProcess1.Running) >  WAIT 10 >  WEND This does work but is slow, potentially pointless wait of nine seconds at the end. Instead you could split this function into two:

Re: [Gambas-user] hProcess is NULL

2010-12-27 Thread Demosthenes Koptsis
if i use SHELL sCommand to sVar i have to wait to complete execution of command. Right? In my case hProcess1 = SHELL sCommand FOR INPUT AS "AntiVirRun" sCommand is a scan command of an antivirus for 9000 files and more... This takes almost 10 minutes or more to be completed. i want in these

Re: [Gambas-user] hProcess is NULL

2010-12-27 Thread Demosthenes Koptsis
This is a way not to continue the execution of next line codes until hProcess1 is finished and at the same time be able to process AntiVirRun_Read. Is there any other way? Everything is welcomed. On Mon, 2010-12-27 at 11:27 +0100, Fabien Bodard wrote: > 2010/12/27 Demosthenes Koptsis : > > Well

Re: [Gambas-user] hProcess is NULL

2010-12-27 Thread Fabien Bodard
Exec ["ls", "-a"] to sLig Print sLig To do what you want it's enought 2010/12/27 Fabien Bodard : > 2010/12/27 Demosthenes Koptsis : >> Well i found a way >> >> >> hProcess1 = SHELL sCommand FOR INPUT AS "AntiVirRun" >> WHILE (hProcess1.Running) >>  WAIT 10 >> WEND >> > > ?? what is tha

Re: [Gambas-user] hProcess is NULL

2010-12-27 Thread Fabien Bodard
2010/12/27 Demosthenes Koptsis : > Well i found a way > > > hProcess1 = SHELL sCommand FOR INPUT AS "AntiVirRun" > WHILE (hProcess1.Running) >  WAIT 10 > WEND > ?? what is that ? > yes there is a reason because i want to stop execution of next lines but > i cant explain it right now. > > So

Re: [Gambas-user] hProcess is NULL

2010-12-27 Thread Demosthenes Koptsis
Well i found a way hProcess1 = SHELL sCommand FOR INPUT AS "AntiVirRun" WHILE (hProcess1.Running) WAIT 10 WEND yes there is a reason because i want to stop execution of next lines but i cant explain it right now. So with this code i can process _Read event of process and stop execution of co

Re: [Gambas-user] hProcess is NULL

2010-12-27 Thread Ron
Not clear why you want to wait exactly, but another way is not to wait but to continue when process is finished. AntiVirRun_Kill() is called when process is finished. So you can do other things in meantime (like parsing _Read) and call the code to run from _Kill to continue. See here for some cod

Re: [Gambas-user] hProcess is NULL

2010-12-27 Thread Ian Haywood
On Mon, Dec 27, 2010 at 8:11 PM, Demosthenes Koptsis wrote: > On Mon, 2010-12-27 at 10:20 +1100, Ian Haywood wrote: >> On Mon, Dec 27, 2010 at 4:46 AM, Demosthenes Koptsis >> wrote: >> > Hello and merry Christmas, >> > >> > i have these lines of code >> > >> > --- >> >  sCommand = "/opt/a

Re: [Gambas-user] hProcess is NULL

2010-12-27 Thread Demosthenes Koptsis
On Mon, 2010-12-27 at 10:20 +1100, Ian Haywood wrote: > On Mon, Dec 27, 2010 at 4:46 AM, Demosthenes Koptsis > wrote: > > Hello and merry Christmas, > > > > i have these lines of code > > > > --- > > sCommand = "/opt/avast4workstation-1.3.0/bin/avast -r " & > > txtVirusTempFolder.Text & "

Re: [Gambas-user] hProcess is NULL

2010-12-26 Thread Ian Haywood
On Mon, Dec 27, 2010 at 4:46 AM, Demosthenes Koptsis 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

[Gambas-user] hProcess is NULL

2010-12-26 Thread Demosthenes Koptsis
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