[Gambas-user] SHELL syntax not as advertised???

Benoit Minisini gambas at ...1...
Thu Feb 2 23:45:59 CET 2006


On Thursday 02 February 2006 18:54, Christopher Brian Jack wrote:
> I'm bad for forgetting subject topics :(
>
> The documentation seems off for the SHELL command:
>
> As per the offline docs in 1.9.23:
>   SHELL "<cmd>[ <args>]" ( READ | WRITE | READ WRITE ) AS <var>
>
> When trying the line:
>
> ...
>  16: PRIVATE video AS Process
> ...
> 'MainScreen is the name of a Form
> 285: SHELL "mplayer -wid " & Str(MainScreen.handle) & " -slave
> -noconsolecontrols -nojoystick -nolirc -nomouseinput" FOR READ WRITE AS
> video
>
> I get the error:
> Unexpected AS in Line 125 of Intro.module
>
> So what is the correct way to use shell to drive a console command
>
> On another note mplayer seems not to like what the handle property is
> giving back as an ID ([BadWindow] is XLib's complaint).
>
> .=================================================.
>
> |  Christopher BRIAN Jack aka "Gau of the Veldt"  |
>
> `================================================='
>

The offline documentation is deprecated (it is for the 1.0 version).

If you want to know how to embed mplayer, look at the MoviePlayer example. 
This needs a DrawingArea with Enabled = False, which internally implies some 
specific X11 stuff, needed to embed an application like mplayer.

Regards,

-- 
Benoit Minisini





More information about the User mailing list