Re: [Gambas-user] I need your help with Processes

2012-02-03 Thread M. Cs.
Success! I'm going to share it with you: Public $hProcess As Process Private $sText As String Public Sub Main() Dim fajl As File Dim i As Integer $hProcess = Exec ["ftp", "ftp.mysite.com"] For Input Output As "Process" Run_command("cd ./public_html") Repeat Wait 0.1 Until InStr($sTex

Re: [Gambas-user] I need your help with Processes

2012-02-03 Thread M. Cs.
I've managed to decrease the problem. I can create a ~/.netrc and I can place all the required data into it. So I'm able to reach the ftp server with Run_command("ftp ftp.mysite.com") , and I'm in. But how can I execute something inside that very same process? I don't understand that bubbling conce

Re: [Gambas-user] I need your help with Processes

2012-02-03 Thread Jussi Lahtinen
> Repeat >wait 1 > Until checker=TRUE > checker=FALSE > After every Run_command() > Maybe you want to include that into Run_command(), that would make the code tidier. Also when wait is in loop, I think one second is too long time, if there is multiple commands to execute... > My problem i

Re: [Gambas-user] I need your help with Processes

2012-02-03 Thread M. Cs.
Thanks! I've tried to add: Repeat wait 1 Until checker=TRUE checker=FALSE After every Run_command() and Public Sub Process_Read() Dim sStr As String Read #$hProcess, sStr, -256 answers.Add(sStr) checker=TRUE End My problem is how to solve insertion of user name and password as well a

Re: [Gambas-user] I need your help with Processes

2012-02-03 Thread Jussi Lahtinen
Hmmm... seem like you need to wait for the execution of the commands. Try: Public Sub Main() > Dim fajl As File > Dim tovabb As Boolean > Dim i As Integer > $hProcess = Exec ["bash", "--noediting"] For Input Output As "Process" > tovabb = Run_command("ftp") > tovabb = Run_command("open") >

[Gambas-user] I need your help with Processes

2012-02-03 Thread M. Cs.
Public $hProcess As Process Private $sText As String Private answers As New String[] Public Sub Main() Dim fajl As File Dim tovabb As Boolean Dim i As Integer $hProcess = Exec ["bash", "--noediting"] For Input Output As "Process" tovabb = Run_command("ftp") tovabb = Run_command("open")