It is currently March 28th, 2024, 6:46 pm

Volume control.

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Volume control.

Post by jsmorley »

My keyboard has media control buttons on it, and when the volume buttons on that are pressed, there is a small UI element that pops up and displays the change. This is driven by the keyboard however, and does not respond to changes made through the volume control on the taskbar in Windows, nor any Rainmeter skin. It is presumably part of the Logitech software for my keyboard.

Having said that, there is no possible way I know of to cause that to happen other than by pressing the keyboard buttons.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Volume control.

Post by balala »

kyriakos876 wrote:Actually, MediaKey is exactly what I was looking for... when this action LeftMouseUpAction=!CommandMeasure "MeasureMediaKey" "VolumeMute" is commanded, it will actually pop-up the little bar on the left corner. Thanks, I was unaware of this Measure! (I thought I read all the measures back in the day, but apparently I missed something)
That Win10 UI which appears in the upper left corner of the screen every time the volume is changed, appears no matter how do you change the volume. That's not something related to Rainmeter.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Volume control.

Post by jsmorley »

Ah yeah, MediaKey might actually simulate the key-press...
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Volume control.

Post by kyriakos876 »

balala wrote:That Win10 UI which appears in the upper left corner of the screen every time the volume is changed, appears no matter how do you change the volume. That's not something related to Rainmeter.
Not if you use Win7AudioPlugin.

Code: Select all

[Rainmeter]
Update=-1
BackgroundMode=2

[MeasureMediaKey]
Measure=MediaKey

[Up]
Meter=String
Text="Up"
LeftMouseUpAction=!CommandMeasure "MeasureMediaKey" "VolumeUp"
FontColor=255,255,255
AntiAlias=1

[Down]
Meter=String
Text="Down"
Y=R
LeftMouseUpAction=!CommandMeasure "MeasureMediaKey" "VolumeDown"
FontColor=255,255,255
AntiAlias=1
See this code doesn't need any meter to create the bar/ percentage/ mute/ etc... it uses the already existing UI. Unlike Win7AudioPlugin, that you would need to create those.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Volume control.

Post by jsmorley »

I would caution that this is not certain to work on all keyboards, and that the appearance of the UI element is not certain to be the same.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Volume control.

Post by jsmorley »

User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Volume control.

Post by kyriakos876 »

jsmorley wrote:I would caution that this is not certain to work on all keyboards, and that the appearance of the UI element is not certain to be the same.
This is implemented into windows, so even without a keyboard, if you click on those meters, the volume will change respectively, showing the top-left volume bar.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Volume control.

Post by kyriakos876 »

yea, that :17nodding
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Volume control.

Post by eclectic-tech »

I'm glad that MediaKey Measure solved your query.

According to the docs, it does not work with all media players, so I was a bit hesitant to suggest it... but good to know it works with Win10 UI. :great: