[Gambas-user] SHELL WRITE command

Benoit Minisini gambas at ...1...
Thu May 19 11:51:04 CEST 2005


On Thursday 19 May 2005 11:06, Tom wrote:
> On Thu May 19 2005 6:50 pm, Benoit Minisini wrote:
> > On Tuesday 17 May 2005 13:43, Tom wrote:
> > > Hey,
> > >
> > > I am trying to read the output of a command using Process_Read(),
> > > however it's output is a prompt for the user to type something in...
> > >
> > > What I did was:
> > >
> > > SHELL command WAIT FOR READ WRITE AS myProcess
> > >
> > > PUBLIC SUB Process_Read()
> > >
> > >         reads the line into a variable
> > >
> > >         if the variable is "user prompt:" then
> > >                 WRITE getUserInput()
> > >         end if
> > >
> > > END
> > >
> > > however it doesnt seem to work...
> > >
> > > Have I done something wrong?
> >
> > Please tell which version of gambas you use. In older stable releases,
> > the compiler didn't tell that WAIT and FOR READ WRITE are not compatible.
> >
> > Regards,
>
> I am using 1.0.3, I tried to compile 1.0.6 but then it complains that it
> can't find the gb.qt.something components. And I havnt found a debian 
> package for it :s

You need to install the development packages for that...

>
> I removed the WAIT and now it just outputs errors from standard output (as
> if nothing was entered and then an error was outputed)

What command do you run exactly ? What errors did you get ?

>
> To make things easier to understand, I am trying to connect to an svn
> repository using svn+ssh and so in konsole it will ask for a passphrase. I
> am just trying to make an interface that will let the user to input the
> passphrase and then output it to the stdin.
>
> Is this possible?
>

You must check before than the program you run needs a terminal, otherwise 
things may work differently (like 'ls') or not at all (gdb I think needs a 
terminal for example).

In the development version, I added a syntax (SHELL/EXEC ... FOR INPUT OUTPUT) 
that run the called program in a virtual terminal, and I succeeded in sending 
commands to gdb.

Regards,

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




More information about the User mailing list