I'm trying to obtain the sound output monitor's name (as a string using 
the Shell command) for later use in an Exec command (calling ffmpeg).

Running  the appropriate command in a Terminal gives:
   john@JohnDesktop:~$ pactl list | grep -A2 '^Source #' | grep 'Name: 
.*\.monitor$' | awk '{print $NF}' | tail -n1
   alsa_output.pci-0000_00_1b.0.analog-stereo.monitor

I have Gambas code for opening FMain form as:
   Dim sSoundMonitorExtractor As String
   Me.Center()
   sSoundMonitorExtractor = Shell$("pactl list | grep -A2 '^Source #' | 
grep 'Name: .*\\.monitor$' | awk '{print $NF}' | tail -n1")
   Shell sSoundMonitorExtractor To sSoundMonitor
   Print "Sound Monitor = " & sSoundMonitor

I have 2 backslashes in the Shell$'s string as otherwise the compiler 
objects. When I run the Gambas executable, the Console displays:
   Sound Monitor =
I.e. sSoundMonitor is not set. What am I doing wrong?

Regards,
John

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to