[Gambas-user] send 'pgup' to process

Johny Provoost johny.provoost at ...27...
Tue Jan 21 14:33:23 CET 2014


   op 21-01-14 12:58, Tobias Boege schreef:

On Mon, 20 Jan 2014, Johny Provoost wrote:

Hi,

I adapted the example Movieplayer from Beno?t .
It's about sending keys to mplayer.
I can send "+" and "-' to the process with success, but when want to 
send "PageUp", "PageDown", "Up", "Down","Left", and 'right', I get stuck.


the line is

   If Not $hProcess Then Return
   Print #$hProcess,-here comes the key to send- ;

I tried
key.PageUp,
Desktop.Sendkeys("[PageUp"]), with and without the quotes.
PgUp instead of PageUp

You are talking to mplayer via its text-interactive interface when you are
using Print #$hProcess. You don't need to figure out how to send some key
codes because mplayer understands *commands* via this channel.

It's a shame that we haven't found time to finally prepare our mplayer-based
web radio program for public (or did we and just don't find it?).

However, you can start mplayer with its -slave switch and then look at the
command reference[0]. To, e.g., set the volume to 90%, do:

  Print $hProcess, "set_property volume 90"

To emulate PageUp, which is, by default, to seek forward by 10 minutes, you
may do

  Print $hProcess, "seek +600"

but it's really all in the docs.

Regards,
Tobi

[0] [1]http://www.mplayerhq.hu/DOCS/tech/slave.txt

   Ok, thanks will look in to this

   --

   Vriendelijke Groeten

   Johny Provoost

   mailto: [2]johny.provoost at ...27...

   mailto: [3]johny.provoost at ...626...

   Website: [4]http://www.johnyprovoost.net

References

   1. http://www.mplayerhq.hu/DOCS/tech/slave.txt
   2. mailto:johny.provoost at ...27...
   3. mailto:johny.provoost at ...626...
   4. http://www.johnyprovoost.net/



More information about the User mailing list