Console Application
Posted
#1
(In Topic #745)
Trainee
Have a very stupid question I am sure.
I am trying to write a console application to help me fix a pulsemixer issue. LOL. The problem is simple. As I have an Elgato Stream Deck, I want to be able to press one key to mute/unmute a particular source. Problem is pulsemixer for whatever reason (or Linux) keeps changing the source 'ID' randomly. So one morning it may show my USB Mic as 'source-3' and the other day as 'source-15'.
So I wrote this small app using Gambas3 that basically runs a shell command to a variable (something like 'pulsemixer -list-sources | grep 'Realtek') and then I massage the string to find the actual source ID that is tied to the 'Realtek USB' input.
When I run it within the Gambas3 IDE, everything works GREAT! I see the mic icon on the taskbar being muted. Just perfect. LOL
Now the problem is, how do I run this on bash (terminal)? I tried simply running the .gambas file but it throws all sorts of errors and resuming, does not work.
How is this achieved?
I want to get this going so I can configure my Stream Deck to mute/unmute that particular input using this Gambas console app. Does it make sense?
Thanks a lot!
CR
Posted
Regular

tsmvp said
…When I run it within the Gambas3 IDE, everything works GREAT! I see the mic icon on the taskbar being muted. Just perfect. LOL
Now the problem is, how do I run this on bash (terminal)? I tried simply running the .gambas file but it throws all sorts of errors…
Please post the output from the terminal window when you run the .gambas exe file. The easy way is to left-click in the terminal after the last line, then drag the mouse across all the text, and then hit the keys <ctrl><shift> c
You can then paste this in a text file or directly into your next post using keys <ctrl> v
(sorry if you know all this, but this is the Beginners section)
Posted
Guru

<IMG src="https://www.cogier.com/gambas/DesktopCompile.png">
</IMG>
Posted
Trainee
Thanks for the help! It works a treat now and I do not have to worry about the damn pulsemixer changes any longer!
CR
1 guest and 0 members have just viewed this.


