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

Jussi Lahtinen jussi.lahtinen at ...626...
Mon Jan 30 16:19:33 CET 2012


> I've previously tried not redirecting the output to a file but instead
> processing the variable on completion of the Shell/Exec command. The
> disadvantage of this is that if the program get_iplayer hangs/crashes
> then I can't examine the file: I want to be able to run this without
> debug mode being on and so I cannot look at the variable sOutput if it
> crashes. Thus I want to use a file for stdout & stderr and I expect
> sOutput to be empty (in the Test project, I have temporary code which
> shows that sOutput is empty no matter what happens in get_iplayer's
> execution).
>

sOutput is always empty as expected. Why you want 'write' it?




> I'm forced to use the 'To' clause in Shell/Exec because of its syntax:


No, it is not mandatory.



In the case when get_iplayer has gone to normal end in its execution,
> the file has been created and is OK. However, I still get the blank
> window during get_iplayer's execution: the window returns to normal when
> get_iplayer finishes.
>

As expected and as I already wrote. Interpreter waits for output and then
continues execution.


Jussi



More information about the User mailing list