[Gambas-user] Executing Shell command (also applies to Exec command), FMain form goes blank

Jussi Lahtinen jussi.lahtinen at ...626...
Mon Jan 30 18:53:39 CET 2012


No, I understand your problem and your goal perfectly, and I have already
answered two times.
I don't understand what you don't understand. I don't think you have read
the documentation.
First line of the documentation describes:

[ *Process* *=* ] *SHELL* *Command* [ *WAIT* ] [ *FOR* { { *READ* |
*INPUT* } | { *WRITE* | *OUTPUT* } } ] [ *AS* *Name* ]

Everything between [] means optional. So, *command* is only mandatory
parameter.

Just leave out the "To sOutput". No matter what happens, crash or not,
sOuput will be empty.
It doesn't do anything, it doesn't make any sense, it will just hang GUI if
execution of the command takes long time.
Redirection to file is done by terminal, not gambas. Gambas just passes the
command (which includes to redirection) to terminal.

Jussi




On Mon, Jan 30, 2012 at 19:08, John Rose <john.aaron.rose at ...626...> wrote:

> Jussi,
>
> I've obviously failed to explain this properly. I want the Shell command
> to execute the program get_iplayer with specified parameters. I also
> want stdout & stderr to be written to a file: the reason being is that
> get_iplayer has a tendency to hang/crash so writing stdout & stderr to a
> variable would be no good. Whilst get_iplayer is executing, I want the
> FMain form to still be displayed with its controls showing (i.e. the
> form should not be blank).
>
> I presume that the Exec command is not available to me as bash is
> required to redirect stdout & stderr to a file.
>
> I thought that the second form of the Shell command (as described in the
> documentation) would be best. Due to the redirection of stdout & stderr
> to a file, I would expect the 'To' variable to be empty.
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list