Ladies/Gents,
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
Console Application
Re: Console Application
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> ctsmvp wrote: ↑Thursday 30th September 2021 2:21am ...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...
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)
- cogier
- Site Admin
- Posts: 1125
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: Console Application
What happens if you compile the code in the IDE and add a Desktop icon. Will it run from the Desktop?
Re: Console Application
It was my own stupidity . After you guys mentioned the create a desktop shortcut thing, I did it and then when I tried to double click it, it opened a text file and I could see what was in it, including the command line launching the .gambas file. I copied that and tried from a terminal window and it worked. Then I remember I was trying to launch it using 'sh ./file.gambas' and of course that was the problem.
Thanks for the help! It works a treat now and I do not have to worry about the damn pulsemixer changes any longer!
CR
Thanks for the help! It works a treat now and I do not have to worry about the damn pulsemixer changes any longer!
CR