Hello guys I hope you're ok, after 3 days of studying the code of how the volume works, I had to turn to another skin that I got out there and modify it, there were really many things missing and that’s why the volume didn’t come out, now, from what I could understand and modify, this is what I got:
Code: Select all
[Rainmeter]
Update=35
BackgroundMode=2
SolidColor=0,0,0,1
[mPlayer]
Measure=Plugin
Plugin=NowPlaying.dll
PlayerName=WMP
PlayerType=Volume
IfCondition=mPlayer = -1
IfTrueAction=[!SetOption MeterSlider X "(([mPlayer:] * (117 - 5) / 100) + 5)"]
IfConditionMode=1
; MeasureMouse is the meat and potatoes of creating a slider. MeasurePercent is used to turn the position into a percentage for use various places.
[MeasureMouse]
Measure=Plugin
Plugin=Mouse
LeftMouseDragAction=[!SetOption MeterSlider X "(Clamp(($MouseX$-15),5,117))"][!SetOption MeterSlider Shape "Rectangle 16,0,6,10 | Fill Color 205,205,205,255 | Stroke Color 255,0,0,255"][!SetOption mPlayer IfCondition ""][!ShowMeter MeterPercent][!UpdateMeter "MeterPercent"][!UpdateMeasure MeasurePercent][!UpdateMeter *][!Redraw]
LeftMouseUpAction=[!CommandMeasure MeasureMouse "Stop"][!SetOption mPlayer IfCondition "mPlayer = -1"][!SetOption MeterSlider Shape "Rectangle 16,0,6,10 | Fill Color 247,247,247,255 | StrokeWidth 0"][!UpdateMeter *][!Redraw][!UpdateMeasure MeasurePercent][!HideMeter MeterPercent][!UpdateMeasure mPlayer]
RelativeToSkin=1
RequireDragging=1
DynamicVariables=1
[MeasurePercent]
Measure=Calc
Formula=[MeterSlider:X]
MinValue=5
MaxValue=117
DynamicVariables=1
IfCondition=mPlayer > -1
IfTrueAction=[!CommandMeasure "mPlayer" "SetVolume [MeasurePercent:%,0]"]
IfConditionMode=1
[MeterSlideBack]
Meter=Shape
Shape=Rectangle 0,0,120,10 | Fill Color 0,0,0,1 | StrokeWidth 2 | Stroke Color 255,0,0,255
X=20
Y=20
LeftMouseDownAction=[!ShowMeter "MeterPercent"][!CommandMeasure MeasureMouse "Start"][!SetOption mPlayer IfCondition ""][!UpdateMeter *]
LeftMouseUpAction=[!SetOption mPlayer IfCondition "mPlayer = -1"]
[MeterSlideBar]
Meter=Shape
X=20
Y=20
Shape=Rectangle 1,1,[MeterSlider:X],8,0 | Fill Color 150,0,0,180 | StrokeWidth 0
DynamicVariables=-1
[MeterSlider]
Meter=Shape
Y=20
Shape=Rectangle 16,0,6,10 | Fill Color 247,247,247,255 | Stroke Color 255,0,0,255
LeftMouseDownAction=[!ShowMeter MeterPercent][!CommandMeasure MeasureMouse "Start"][!UpdateMeter "MeterPercent"]
MouseOverAction=[!SetOption MeterSlider Shape "Rectangle 16,0,6,10 | Fill Color 205,205,205,255 | Stroke Color 255,0,0,255"][!ShowMeter MeterPercent][!UpdateMeter "MeterPercent"][!UpdateMeter "MeterSlider"][!Redraw][!SetOption MeasureMouse LeftMouseUpAction """[!CommandMeasure MeasureMouse "Stop"][!SetOption mPlayer IfCondition "mPlayer = -1"][!UpdateMeter *][!Redraw][!UpdateMeasure MeasurePercent][!UpdateMeasure mPlayer]"""]
MouseLeaveAction=[!SetOption MeterSlider Shape "Rectangle 16,0,6,10 | Fill Color 247,247,247,255 | Stroke Color 255,0,0,255"][!HideMeter MeterPercent][!UpdateMeter "MeterPercent"][!UpdateMeter "MeterSlider"][!Redraw][!SetOption MeasureMouse LeftMouseUpAction """[!CommandMeasure MeasureMouse "Stop"][!SetOption mPlayer IfCondition "mPlayer = -1"][!SetOption MeterSlider Shape "Rectangle 16,0,6,10 | Fill Color 247,247,247,255 | Stroke Color 255,0,0,255"][!UpdateMeter *][!Redraw][!UpdateMeasure MeasurePercent][!HideMeter MeterPercent][!UpdateMeasure mPlayer]"""]
DynamicVariables=1
[MeterPercent]
Meter=String
X=([MeterSlider:X]+14)
Y=45
FontFace=BitDust Two
FontSize=12
FontColor=255,255,255,255
Percentual=1
NumOfDecimals=0
StringAlign=CenterCenter
DynamicVariables=1
Text=[MeasurePercent:%,0]
InlineSetting=CharacterSpacing | 0 | -0.25
Hidden=1
Darkling.gif
Although I could partially dispel how the code works, I notice that it has erratic behavior at times, I’ve made several modifications to see if it gets better but I couldn’t, one of the things I’d like to correct is that when I refresh the skin, almost always lowers the volume to zero, also happens when I load the skin the first time, if there is someone who can better understand this behavior, please give me a hand, as always thanks in advance and sorry for the inconvenience.
You do not have the required permissions to view the files attached to this post.