It is currently April 27th, 2024, 12:22 pm

simple volume meter

Get help with creating, editing & fixing problems with skins
User avatar
OH SNAP998
Posts: 18
Joined: December 27th, 2012, 6:17 am

simple volume meter

Post by OH SNAP998 »

hey i want to create a simple volume meter that i can click to change the volume of my computer. ideally i would want just a bar meter, not images i have to make(though i could do it). i have a skin that does this already, however, i dont understand it. do you have to have a plugin? ive never used rainmeter plugins, though. thanks
no power in the verse can stop me...
Blue
Posts: 4
Joined: December 27th, 2012, 1:48 pm

Re: simple volume meter

Post by Blue »

well i took a fast look at a plugin (Win7AudioPlugin) that already dose that and its fairly easy to do it...
a simple bar... well idk if its possible but this plugin has small images which are actually transparent pixels and when clicked on them an other bar actually scrolls in..
and its just a matter of copy pasting some code u could make it in a few minutes
it looks something like this

Code: Select all

[Volume0]
Meter=IMAGE
SolidColor=0,0,0,1
X=39
Y=364
W=15
H=16
LeftMouseUpAction= !Execute [!PluginBang "MeasureWin7Audio SetVolume 0"]

[Volume5]
Meter=IMAGE
SolidColor=0,0,0,1
X=r
Y=-16r
W=15
H=16
LeftMouseUpAction= !Execute [!PluginBang "MeasureWin7Audio SetVolume 5"]
and so on for volume 10,15,20,.....,100
of course this one was made to have a difference of 5% if u made a 1000 pixel long bar u could have every 10 pixel to make 1% of volume

hope that helped
User avatar
OH SNAP998
Posts: 18
Joined: December 27th, 2012, 6:17 am

Re: simple volume meter

Post by OH SNAP998 »

thanks, i will try that. :D also is there a way to show the current volume on a bar(VU meter)?

EDIT: wait, this code doesnt really make sense, why is the color 0,0,0,1? arent you supposed to see the skin? :confused:
no power in the verse can stop me...
User avatar
lysy1993lbn
Posts: 291
Joined: July 25th, 2011, 9:53 am
Location: Lublin, Poland

Re: simple volume meter

Post by lysy1993lbn »

He tried to explain how to make bar clickable.. The code with "transparent images" is supposed to be above actual bar.

Anyway, i think that change volume with mouse scroll would be more handy and much easier to make..

You can take a look at my simple volume skin to see how it can be done with scroll actions
"Never argue with an idiot, he will drag you down to his level and beat you with experience."
my deviantART | Alternative Rainmeter tray icons
User avatar
ScoobSTi
Posts: 127
Joined: September 12th, 2012, 10:49 pm

Re: simple volume meter

Post by ScoobSTi »

How did you get the volume number? I'm just poking around the code and I don't see it.
Image
User avatar
OH SNAP998
Posts: 18
Joined: December 27th, 2012, 6:17 am

Re: simple volume meter

Post by OH SNAP998 »

lysy1993lbn wrote:He tried to explain how to make bar clickable.. The code with "transparent images" is supposed to be above actual bar.

Anyway, i think that change volume with mouse scroll would be more handy and much easier to make..

You can take a look at my simple volume skin to see how it can be done with scroll actions
Sorry Norton Blocked this Site as :twisted: Malicious :twisted: can you please post the code as im not about to ignore that warning!
no power in the verse can stop me...
User avatar
lysy1993lbn
Posts: 291
Joined: July 25th, 2011, 9:53 am
Location: Lublin, Poland

Re: simple volume meter

Post by lysy1993lbn »

Weird.. I'm pretty sure that this hosting is safe..
Any way, here you go, on MyCloud: http://cl.ly/0B3w460T032K

Or as code
Folder Structure:
MetroVol
MetroVol\@Resources

Files cintent:
MetroVol\Vertical.ini

Code: Select all

[Rainmeter]
ContextTitle="Edit Variables"
ContextAction=[notepad "#@#VAR.ini"]

[mAudio]
Measure=Plugin
Plugin=Win7AudioPlugin

[mAudioString]
Measure=Calc
Formula=(mAudio+1-1)

[Variables]
@Include=#@#\VAR.ini

[BGR]
Meter=Image
SolidColor=#bgcolor#
W=32
H=205
MouseScrollUpAction=!CommandMeasure "mAudio" "ChangeVolume #step#"
MouseScrollDownAction=!CommandMeasure "mAudio" "ChangeVolume -#step#"

[BARBG]
Meter=Image
SolidColor=100,100,100
W=8
H=165
Y=12
X=12

[BAR]
Meter=Bar
MeasureName=mAudio
BarColor=#maincolor#
W=8
H=165
Y=r
X=r
BarOrientation=Vertical

[VOL]
Meter=String
MeasureName=mAudioString
FontColor=#maincolor#
FontFace=Segoe WP Semibold
FontSize=11
Antialias=1
StringAlign=Center
X=16
Y=181
MetroVol\Horizontal.ini

Code: Select all

[Rainmeter]
ContextTitle="Edit Variables"
ContextAction=[notepad "#@#VAR.ini"]

[mAudio]
Measure=Plugin
Plugin=Win7AudioPlugin

[mAudioString]
Measure=Calc
Formula=(mAudio+1-1)

[Variables]
@Include=#@#\VAR.ini

[BGR]
Meter=Image
SolidColor=#bgcolor#
W=225
H=32
MouseScrollUpAction=!CommandMeasure "mAudio" "ChangeVolume #step#"
MouseScrollDownAction=!CommandMeasure "mAudio" "ChangeVolume -#step#"

[BARBG]
Meter=Image
SolidColor=100,100,100
W=175
H=8
Y=12
X=12

[BAR]
Meter=Bar
MeasureName=mAudio
BarColor=#maincolor#
W=175
H=8
Y=r
X=r
BarOrientation=Horizontal

[VOL]
Meter=String
MeasureName=mAudioString
FontColor=#maincolor#
FontFace=Segoe WP Semibold
FontSize=11
Antialias=1
StringAlign=Center
X=205
Y=6
MetroVol\@Resources\VAR.ini

Code: Select all

[Variables]
;Color of background
bgcolor=37, 37, 37
;Color of Bar and font
maincolor=38, 115, 236
;Number of volume change steps on scrolling
step=5
"Never argue with an idiot, he will drag you down to his level and beat you with experience."
my deviantART | Alternative Rainmeter tray icons