Prevent 3rd party prog (VLC) from receiving code
So I'm using a custom remote button that switches audio output from PC to HDMi-linked TV. I have included code that increases the volume (on the PC's volume mixer) to 100%, in case ive had it turned down for PC speakers.
--Vol 100% and TV Audio============ function down(i) for i = 1, i do kb.press("volumedown"); end end function up(i) for i = 1, i do kb.press("volumeup"); end end function zero() if OS_WINDOWS then down(50); else down(16); end end function set(x) zero(); if OS_WINDOWS then up(math.floor(x / 2)); else up(math.floor(x / 6.25)); end end [email protected] Switch TV Audio (using Audio Switcher kb shortcut), and Set volume to 100% actions.vol100altplus = function () kb.stroke("alt", "numpadadd"); set(100); end
I borrowed the volume code from the UR Volume remote :)
Only problem is if VLC is open, VLC receives the "volumeup" key press as well, and increases its volume to its own "100%", which is much higher (I have VLC's upper limit set at 125% so I can boost a bit if low-vol audio source).
Is there something I can add to my code to exclude VLC from processing these commands? I was thinking it might come in handy to learn this anyway for other possible conflicts in the future..
I fixed this btw, using nircmd.