[Gambas-user] Doubts in execute shell commands
ron
ronstk at ...239...
Fri Nov 9 05:19:07 CET 2007
On Thursday 08 November 2007 22:05, Tomas Eroles i Forner wrote:
> Hi all!
> I have some problems with EXEC and SHELL commands:
> I would like to plot data with gnuplot from a Gambas application using:
>
> SUB button1_Click()
> EXEC ["gnuplot", "graph1.plt"] WAIT
> END
>
> where graph1.plt is a valid gnuplot file.
>
> The problem is when GAMBAS executes this command a window appears in the
> screen showing the graphs, but it disapears inmediately.
> I've tried to add a pause command in the graph1.plt file and it works,
> but only for a while, and I would like one of these solutions:
> - the graph appears in a form but I don't know in which control (if
> possible)
> - the graph appears as a new window, but, the user can close this window
>
> Any idea?
>
> thanks in advance
>
As commandline "gnuplot graph1.plt &" starts a thread/job for it.
Try:
SUB button1_Click()
EXEC ["gnuplot", "graph1.plt", "&"] WAIT
END
Ron
More information about the User
mailing list