Thank you,
IF hProc.State = Process.Running THEN
SHELL ("pidof get_iplayer") TO pid1
SHELL ("pidof mplayer") TO pid2
DEBUG pid1;; pid2
SHELL "kill " & pid1 & " " & pid2
hProc.Kill()
ENDIF
To me this is nice code - it works!
Bill
--
View this message in contex
> This seems to work... but it is not very nice code, as it doesn't make
> distinction of what instance of "get_iplayer" or "mplayer
> you are dealing with...
> Also it leaves some trash (get_iplayer doesn't take care of it's trashes!)
> to ~/.get_iplayer.
> Maybe get_iplayer should be killed with
This seems to work... but it is not very nice code, as it doesn't make
distinction of what instance of "get_iplayer" or "mplayer
you are dealing with...
Also it leaves some trash (get_iplayer doesn't take care of it's trashes!)
to ~/.get_iplayer.
Maybe get_iplayer should be killed with some other
> I think this is what Benoit means;
>
> PUBLIC hProc AS Process
>
> PUBLIC SUB btnPlay_Click()
> hProc = SHELL ("get_iplayer --stream 13280 | mplayer -cache 3072 -")
> FOR WRITE
> END
>
> PUBLIC SUB btnStop_Click()
>
> IF hProc.State = Process.Running THEN
> DEBUG hProc.Handle
>
I think this is what Benoit means;
PUBLIC hProc AS Process
PUBLIC SUB btnPlay_Click()
hProc = SHELL ("get_iplayer --stream 13280 | mplayer -cache 3072 -") FOR
WRITE
END
PUBLIC SUB btnStop_Click()
IF hProc.State = Process.Running THEN
DEBUG hProc.Handle
SHELL "kill -s HUP " & CSt
Benoît, what do you mean by "run shell again" ?
I tried:-
IF hProc THEN
hProc.Kill
SHELL ""
ENDIF
with no effect
Bill
--
View this message in context:
http://old.nabble.com/help-with-EXEC-usage-tp31208112p31235898.html
Sent from the gambas-user mailing list archiv
> > Bit short of time... but quickly looking at this.
> > I'm not sure but I think this problem has something to do with fact that
> > you are starting two process with shell command.
> > And I'm not sure how Gambas2 handles these... does it try to kill the
> > shell itself, or process started with
> Bit short of time... but quickly looking at this.
> I'm not sure but I think this problem has something to do with fact that
> you are starting two process with shell command.
> And I'm not sure how Gambas2 handles these... does it try to kill the shell
> itself, or process started with command s
Bit short of time... but quickly looking at this.
I'm not sure but I think this problem has something to do with fact that you
are starting two process with shell command.
And I'm not sure how Gambas2 handles these... does it try to kill the shell
itself, or process started with command shell.
So,
Sorry - I'll try again.
Its so simple, hardly worth making a project.
I'm using get_iplayer in a Gambas project to download past BBC radio
programmes.
It's working fine. To listen to the programme, this is the code -
get_iplayer --stream 13142 | mplayer -cache 3072 -, where 13142 is the
progra
Can't see attachment..?
Jussi
On Wed, Mar 23, 2011 at 17:51, Bill-Lancaster wrote:
>
> Jussi - little project attached
> --
> View this message in context:
> http://old.nabble.com/help-with-EXEC-usage-tp31208112p31221079.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
>
>
Jussi - little project attached
--
View this message in context:
http://old.nabble.com/help-with-EXEC-usage-tp31208112p31221079.html
Sent from the gambas-user mailing list archive at Nabble.com.
--
Enable your software
Hmmm... no wait... you are working with Gambas 2.
I don't know what is wrong. Please send little project to demonstrate the
problem.
Jussi
On Wed, Mar 23, 2011 at 17:12, Jussi Lahtinen wrote:
> Name is missing...
> $hProcess = SHELL ("get_iplayer --stream 13280 | mplayer -cache 3072-") FOR
> WR
Name is missing...
$hProcess = SHELL ("get_iplayer --stream 13280 | mplayer -cache 3072-") FOR
WRITE *As "Process"*
Jussi
On Wed, Mar 23, 2011 at 10:37, Bill-Lancaster wrote:
>
> Jussi, thanks for the advice.
>
> I forgot to mention that it worked also with SHELL but I had no control
> over
>
Jussi, thanks for the advice.
I forgot to mention that it worked also with SHELL but I had no control over
the process.
$hProcess = SHELL ("get_iplayer --stream 13280 | mplayer -cache 3072
-") FOR WRITE
Neither
PRINT #$hProcess, "q";
nor
IF $hProcess THEN $hProcess.Kill
nor
I think you need to use shell if you need pipes.
http://gambasdoc.org/help/doc/shellexec
Jussi
On Tue, Mar 22, 2011 at 11:07, Bill-Lancaster wrote:
>
> This works OK in terminal:-
>
> get_iplayer --stream 12735 | mplayer -cache 3072 -
>
> But I can't get it to run in EXEC, e.g
>
> $hPro
This works OK in terminal:-
get_iplayer --stream 12735 | mplayer -cache 3072 -
But I can't get it to run in EXEC, e.g
$hProcess = EXEC ["get_iplayer", "--stream", "12735", "|", "mplayer",
"-cache", "3072 -"]
and all kind of other permuations.
Any help would be appreciated
Bill Lan
17 matches
Mail list logo