¿ªÔÆÌåÓý

Locked Changing the windows system volume #windows


 

Team,
I posted this on APR 27 but got no replies and now the topic is locked so here it is again.
?
Is there an expression or small script that can adjust the windows system volume? For example either add or subtract in increments of X% or perhaps commanding the actual 0-100%?
--

Many thanks in advance!

Vinny DeRobertis ~ Apex, NC
New York & Hudson Valley RR

Windows 7 Pro / Java 11 / JMRI v5.7.7
Command Station: Digikeijs DR5000.
Booster: Digikeijs DR5033
Interface: Samsung A7 10.4" Tablets/Fully Kiosk.
DCC/DMX Gateway: Pricom LLS.
LocoNet Input Modules: Digikeijs DR4088LN
DCC Output Modules:
Digikeijs DR4018 / Yamorc YD8116.
Sensors: Model Train Technology: DETECTOR-HO.
Turnout Motors: MTB MP1


 

On 10/20/2024 8:15 AM, Vinny DeRobertis wrote:
Team,
I posted this on APR 27 but got no replies and now the topic is locked so here it is again.
Is there an expression or small script that can adjust the windows system volume? For example either add or subtract in increments of X% or perhaps commanding the actual 0-100%?
You're talking about _Audio_ "volume", right? On a "Windows" O/S machine?

An internet search shows that getting Jython/Python to control the computer's "master" volume control is apparently difficult, at least in part because various Windows O/Ses do things differently, much less non-Windows O/Ses. You may need to add a 3rd-party "library" to make it easier in Jython, but I am unsure how JMRI supports additional libraries for Jython.

Someone might want to investigate a "master volume control" from the Java perspective, though. If possible, they could make some sort of JMRI "plugin", or a new JMRI "feature".

Regards,
Billybob


 

Yes, the system audio volume on windows7. Attached is info I found on using a 3rd party utility that might work. See my follow questions on the attached snip of the original post.


 

On 10/20/2024 6:02 PM, Vinny DeRobertis wrote:
Yes, the system audio volume on windows7. Attached is info I found on using a 3rd party utility that might work. See my follow questions on the attached snip of the original post.
Your latest questions are WELL above my pay grade. Sorry.


 

I have seagulls squawking on the computer when a train approaches the seaside.
I set the volume on the computer and forget it.
When I don't want squawking, I shut it off the playback with a PanelPro panel switch.
The dispatcher (at the computer) has that discretion.
--
Ken
NYNH&H, Old Colony Division, Cape Cod Branch (1949-1959)
Loconet * JMRI 5.9.5 * OSX,Win10,Ubuntu
Blog: ?
Youtube:


 

If there¡¯s a Windows command line way to do it, you can execute that from a JMRI script:

import java

command = ¡°someCommandName¡±
argument = ¡°whatEverElseIsNeeded¡±
java.lang.Runtime.getRuntime().exec([command, argument])

Bob
¡ª
Bob Jacobsen
rgj1927@...