I see!
Now if I wanted to have it change color in accordance to percentage, how would I accomplish that?
Say...
75%100% = blue
50%75% = green
25%50% = yellow
0%25% = red?
It is currently April 20th, 2019, 3:20 pm
Working with Roundline

 Posts: 9
 Joined: May 28th, 2015, 1:56 am

 Developer
 Posts: 19178
 Joined: April 19th, 2009, 11:02 pm
 Location: Fort Hunt, Virginia, USA
Re: Working with Roundline
setsuna wrote:I see!
Now if I wanted to have it change color in accordance to percentage, how would I accomplish that?
Say...
75%100% = blue
50%75% = green
25%50% = yellow
0%25% = red?
Code: Select all
[MeasureBatteryPercent]
Measure=Plugin
Plugin=PowerPlugin
PowerState=Percent
MinValue=0
MaxValue=100
IfCondition=MeasureBatteryPercent < 26
IfTrueAction=[!SetOption MeterCircle LineColor "255,0,0,255"]
IfCondition2=(MeasureBatteryPercent >= 26) && (MeasureBatteryPercent < 51)
IfTrueAction2=[!SetOption MeterCircle LineColor "255,255,0,255"]
IfCondition3=(MeasureBatteryPercent >= 51) && (MeasureBatteryPercent < 76)
IfTrueAction3=[!SetOption MeterCircle LineColor "0,255,0,255"]
IfCondition4=MeasureBatteryPercent >= 76
IfTrueAction4=[!SetOption MeterCircle LineColor "0,150,255,255"]
http://docs.rainmeter.net/manual/bangs#SetOption
You do not have the required permissions to view the files attached to this post.

 Posts: 9
 Joined: May 28th, 2015, 1:56 am
Re: Working with Roundline
sweet thanks I shall play with that and show u the results!
On a side note, could you tell me the command for calling up "control panel" in an .ini file?
I can call up browsers, cmd, and folders since they have a path but I don't know how to do control panel?
On a side note, could you tell me the command for calling up "control panel" in an .ini file?
I can call up browsers, cmd, and folders since they have a path but I don't know how to do control panel?

 Developer
 Posts: 19178
 Joined: April 19th, 2009, 11:02 pm
 Location: Fort Hunt, Virginia, USA
Re: Working with Roundline
Great. Have fun.setsuna wrote:sweet thanks I shall play with that and show u the results!
On a side note, could you tell me the command for calling up "control panel" in an .ini file?
I can call up browsers, cmd, and folders since they have a path but I don't know how to do control panel?
LeftMouseUpAction=["Control"]
http://docs.rainmeter.net/tips/launchingwindowsspecialfolders

 Posts: 9
 Joined: May 28th, 2015, 1:56 am
Re: Working with Roundline
Thanks!jsmorley wrote:The way it works as far as size is:
 The overall meter is defined by W and H.
 The Roundline is drawn using the "center" of the meter as the origin
 So if a meter is W=120 and H=120 then the "center" is at W=60 and H=60
 The LineStart and LineLength value are then calculated from that "center"
So:
W=120
H=120
LineStart=50
LineLength=60
That will create a circle that is 120 X 120, the line will be drawn starting at 50 pixels from the center, and extending to 60 pixels from the center. So that will be a line in the last 10 pixels of the overall circle.
Im sorry I'm having some difficulty with what you mean here
I'm fiddling with the values for W,H,LineStart, and LineLength but it just changes the X,Y coordinates of the various circles.
I want to increase the radius of each circle instead without restrictions within the border
Also, how do I capture the skin as a .gif so I can show you what I've got so far?
thanks again!

 Developer
 Posts: 19178
 Joined: April 19th, 2009, 11:02 pm
 Location: Fort Hunt, Virginia, USA
Re: Working with Roundline
I'm not sure how to better explain it.
Don't worry about X and Y in the context of the "size" of the circle. They can factor into it, but only if you don't define W and H, and not worth dragging into this just now.
So you want a circle that is 100 pixels wide by 100 pixels tall.
So we start by putting a black background on our entire skin, so we can see what we are doing.
Now let's add some RoundLines, and take a look at what the "size" options mean:
As we said, we want the entire circle to be 100 X 100. So we set W=100 and H=100
LineLength is measured from the center of the meter. The center of the meter is LineStart=0 and LineLength=0. The longest that either can be in this example is 50, or one half the total width of the meter.
Why? Well think about it. Look at the pointer line, the thin white line. It has to go around in a full circle to measure from 0% to 100%. The only way it can do that and stay in the boundaries of the 100 X 100 circle is if it "starts" in the center. A RoundLine is ALWAYS rotating around the center of the meter.
Not to get all mathematical, but what we are talking about here is the radius of the circle. The W and H define the diameter of the circle. In the world of circles, 1/2 of the diameter is the radius.
So If you have a RoundLine "meter" that is 100 X 100 (W=100 / X=100) then you have 50 pixels to work with as far as the length of the line. One half the total for width and height.
If we want to change that green "pie" to a "circle", to not fill the entire width the the meter, then we can change LineStart to something else.
If you want to add a smaller circle inside, leave the W and H alone, and just change the LineStart and LineLength:
Here is the whole thing if you want to test it.
P.S. http://blog.bahraniapps.com/gifcam/
Don't worry about X and Y in the context of the "size" of the circle. They can factor into it, but only if you don't define W and H, and not worth dragging into this just now.
So you want a circle that is 100 pixels wide by 100 pixels tall.
So we start by putting a black background on our entire skin, so we can see what we are doing.
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
BackGroundMode=2
SolidColor=0,0,0,255
Code: Select all
[MeterCircleBack]
Meter=Roundline
W=100
H=100
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineStart=0
LineLength=50
LineColor=110,120,130,255
Solid=1
AntiAlias=1
[MeterCircle]
Meter=Roundline
MeasureName=MeasureBatteryPercent
W=100
H=100
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineStart=0
LineLength=50
LineWidth=2
LineColor=110,204,94,255
Solid=1
AntiAlias=1
[MeterPointer]
Meter=Roundline
MeasureName=MeasureBatteryPercent
W=100
H=100
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineStart=0
LineLength=50
LineWidth=2
LineColor=220,230,240,255
AntiAlias=1
LineLength is measured from the center of the meter. The center of the meter is LineStart=0 and LineLength=0. The longest that either can be in this example is 50, or one half the total width of the meter.
Why? Well think about it. Look at the pointer line, the thin white line. It has to go around in a full circle to measure from 0% to 100%. The only way it can do that and stay in the boundaries of the 100 X 100 circle is if it "starts" in the center. A RoundLine is ALWAYS rotating around the center of the meter.
Not to get all mathematical, but what we are talking about here is the radius of the circle. The W and H define the diameter of the circle. In the world of circles, 1/2 of the diameter is the radius.
So If you have a RoundLine "meter" that is 100 X 100 (W=100 / X=100) then you have 50 pixels to work with as far as the length of the line. One half the total for width and height.
If we want to change that green "pie" to a "circle", to not fill the entire width the the meter, then we can change LineStart to something else.
Code: Select all
[MeterCircle]
Meter=Roundline
MeasureName=MeasureBatteryPercent
W=100
H=100
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineStart=40
LineLength=50
LineWidth=2
LineColor=110,204,94,255
Solid=1
AntiAlias=1
Code: Select all
[MeterSmallerCircle]
Meter=Roundline
MeasureName=MeasureBatteryPercent
W=100
H=100
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineStart=20
LineLength=30
LineWidth=2
LineColor=137,210,240,255
Solid=1
AntiAlias=1
Code: Select all
[Rainmeter]
Update=100
AccurateText=1
DynamicWindowSize=1
BackGroundMode=2
SolidColor=0,0,0,255
[MeasureBatteryPercent]
Measure=Calc
Formula=(MeasureBatteryPercent % 100) + 1
MinValue=1
MaxValue=100
[MeterCircleBack]
Meter=Roundline
W=100
H=100
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineStart=0
LineLength=50
LineColor=110,120,130,255
Solid=1
AntiAlias=1
[MeterCircle]
Meter=Roundline
MeasureName=MeasureBatteryPercent
W=100
H=100
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineStart=40
LineLength=50
LineWidth=2
LineColor=110,204,94,255
Solid=1
AntiAlias=1
[MeterSmallerCircle]
Meter=Roundline
MeasureName=MeasureBatteryPercent
W=100
H=100
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineStart=20
LineLength=30
LineWidth=2
LineColor=137,210,240,255
Solid=1
AntiAlias=1
[MeterPointer]
Meter=Roundline
MeasureName=MeasureBatteryPercent
W=100
H=100
StartAngle=(Rad(270))
RotationAngle=(Rad(360))
LineStart=0
LineLength=50
LineWidth=2
LineColor=220,230,240,255
AntiAlias=1
You do not have the required permissions to view the files attached to this post.

 Posts: 9
 Joined: May 28th, 2015, 1:56 am
Re: Working with Roundline
Thanks so much man!
Here's what I ended up frankensteining together!
Can't really show you the other 3 stages of colors just yet but ya... All your help amounted to something! It does decrease according to the set values but I couldn't get the inner circle to do the same?
I tried putting this under "MeterPie" and changing "MeterCircle" to "MeterPie"
[MeterPie]
IfCondition=MeasureBatteryPercent < 26
IfTrueAction=[!SetOption MeterPie LineColor "255,0,0,255"]
IfCondition2=(MeasureBatteryPercent >= 26) && (MeasureBatteryPercent < 51)
IfTrueAction2=[!SetOption MeterPie LineColor "255,255,0,255"]
IfCondition3=(MeasureBatteryPercent >= 51) && (MeasureBatteryPercent < 76)
IfTrueAction3=[!SetOption MeterPie LineColor "0,255,0,255"]
IfCondition4=MeasureBatteryPercent >= 76
IfTrueAction4=[!SetOption MeterPie LineColor "00fffc"]
I'm guessing I have to change something about the IfCondition?
Here's what I ended up frankensteining together!
Can't really show you the other 3 stages of colors just yet but ya... All your help amounted to something! It does decrease according to the set values but I couldn't get the inner circle to do the same?
I tried putting this under "MeterPie" and changing "MeterCircle" to "MeterPie"
[MeterPie]
IfCondition=MeasureBatteryPercent < 26
IfTrueAction=[!SetOption MeterPie LineColor "255,0,0,255"]
IfCondition2=(MeasureBatteryPercent >= 26) && (MeasureBatteryPercent < 51)
IfTrueAction2=[!SetOption MeterPie LineColor "255,255,0,255"]
IfCondition3=(MeasureBatteryPercent >= 51) && (MeasureBatteryPercent < 76)
IfTrueAction3=[!SetOption MeterPie LineColor "0,255,0,255"]
IfCondition4=MeasureBatteryPercent >= 76
IfTrueAction4=[!SetOption MeterPie LineColor "00fffc"]
I'm guessing I have to change something about the IfCondition?
You do not have the required permissions to view the files attached to this post.

 Posts: 164
 Joined: June 29th, 2014, 8:35 pm
Re: Working with Roundline
I'm playing with roundline example from manual, just copypasted, but why "Free Disk" is not correct?

 Developer
 Posts: 19178
 Joined: April 19th, 2009, 11:02 pm
 Location: Fort Hunt, Virginia, USA
Re: Working with Roundline
You are showing "used" instead of "free".drakulaboy wrote:I'm playing with roundline example from manual, just copypasted, but why "Free Disk" is not correct?

 Posts: 164
 Joined: June 29th, 2014, 8:35 pm
Re: Working with Roundline
oh, i was confused, yeah, now i got it, it's "Used Space" there, thank you!