[Gambas-user] Online radio with "Shell"

Tobias Boege taboege at ...626...
Sun Dec 1 23:33:59 CET 2013


On Sun, 01 Dec 2013, abbat81 wrote:
> Hi Tobi,
> Can you explain or give example please?
> 
> I don't understand how to use  
> "Print #$hMPlayer, sCommand"
> 
> I got:
> "Unknown identifier #$hMPlayer"
> 
> How should I declare the #$hMPlayer?
> 
> Thaks

You want to communicate with the mplayer process, don't you? So

--8<----------------
Private $hMPlayer As Process

Public Sub _new()
  $hMPlayer = Shell "mplayer -slave <other_opts> <file>" For Input Output As "MPlayer"
End

Public Sub btnStopPlayback_Click()
  Print #$hMPlayer, "stop"
End

' etc.
--8<----------------

For a list of supported commands... google.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the User mailing list