It's not a problem to use NowPlaying for this, in fact that is presumably what you want, to change the volume of the "player", not the entire system volume.
The issues are:
You are using MouseX, which is based on the "width" of the meter it is in. That isn't what you want. You want to use the "height" of the meter as the basis. So MouseY not MouseX.
However, the percentage you will get is based on a "top down" evaluation of the meter's height. That is going to be the opposite of what you want, since you are displaying the value in the Bar meter vertically from the "bottom up".
Simple enough, just subtract the percentage from 100. However embedded formulas are not going to work in that !CommandMeasure bang, which is sending a "string" to the measure. So we need to use a Calc measure to get that formula as a string and convert it to a real number that we then send to the NowPlaying plugin.
This seems to work fine for me:
Code: Select all
[Rainmeter]
Update=1000
[Variables]
@Include=#@#Variables.inc
[Metadata]
Name=Life is Rainmeter
Author=deXxterlab97
Information=Music progress bar, clickable to seek track (fast forward).
License=to kill
Version=1.1 (beta)
[MusicVolume]
Measure=Plugin
Plugin=NowPlaying
PlayerName=#PN#
PlayerType=Volume
[MeasureChangeVolume]
Measure=Calc
OnChangeAction=[!CommandMeasure MusicVolume "SetVolume [MeasureChangeVolume]"][!UpdateMeasure MusicVolume][!UpdateMeter *][!Redraw]
[BarBackground]
Meter=Image
X=0
Y=0
H=500
W=5
SolidColor=200,200,200,100
LeftMouseUpAction=[!SetOption MeasureChangeVolume Formula "(100-$MouseY:%$)"][!UpdateMeasure MeasureChangeVolume]
DynamicVariables=1
[MeterBar]
Meter=Bar
MeasureName=MusicVolume
X=0
Y=0
H=500
W=5
BarColor=255,255,255
[Volume]
Meter=String
MeasureName=MusicVolume
Text="Volume is %1"
FontColor=255,255,255