It is currently April 27th, 2024, 7:33 pm

Variable CPU data but fixed BAR width ... and a 2nd problem

Get help with creating, editing & fixing problems with skins
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Variable CPU data but fixed BAR width ... and a 2nd problem

Post by Youkai1977 »

I have such a small? (mathematical) problem with my new CPU skin, and I need your expertise again.

My skin has several BARS (Shape) in 120px width.
So, the respective values of my CPU, which these bars should represent, are variable.
Example: 1.225V, or CoreUsage = 100%, TDP 105W and so on

I have the bars running so far. But I think that the formulas to get the respective values calculated up/down to the 120px width (especially in view of the fact that I might want to make the finished skin available to others with other CPUs and correspondingly different values) are a "I'm not Mr. Einstein" knot in my brain.
Especially because for one of the values (for CPU voltage (volts)) I used the "Formula: Division by 0: (1 + (120/0.00))" - thing does not go away. (Not part of the following code snippet.)

Let me upload a part of the code: "The CPU Average USage"-Part.
The complete skin (maybe even now as *.rmskin file) is too late for me tonight.
But I will gladly and of course make it available to you if needed.

PART: CPU AVERAGE USAGE

Code: Select all

[Rainmeter]
Update=500
AccurateText=1

;==================================================
;=== VARIABLES & STYLES ===========================
;==================================================

[VARIABLES]
;==================================================
;=== VARIABLES FONTFACE - SIZE - COLORS ===========
;==================================================
Images1=#@#images\
Images2=#@#Images\apps\
FontFace=Courier Prime Sans
FontWeight=700
MinMaxWidth=55
W=635
H=320
FS1=16
FS2=14
FS3=10
FS4=8
Alpha0=1
Alpha1=70
Alpha2=130
Alpha3=255
Color0=0,0,0,
Color1=255,255,255,
Color2=253,193,0,
Color3=200,0,0,
Color4=64,64,64,
Color5=255,104,67,
Color6=0,255,0,
Color7=192,192,192,
Color8=15,255,168,
Color9=100,100,100,
;==================================================
Tmax=90
TDP=105
BaseClock=3800
BoostClock=4700

;--- STYLES CPU GRAPHICS/LABELS/WARNING ETC -------
[StCPU_BG]
ImageName=#Images1#bg_cpu.png
ImageAlpha=#Alpha3#
AntiAlias=1
UpdateDivider=-1
Container=CONTAINER_CPU
W=140
H=140

;--- STYLES CURRENT CPU USAGE (Average) -----------
[StCPUUSAGEAVLABEL]
Padding=-1,-5,-1,-9
SolidColor=#Color0##Alpha0#
FontColor=#Color7##Alpha3#
FontFace=#FontFace#
StringAlign=LEFT
StringCase=UPPER
FontWeight=#FontWeight#
FontSize=#FS2#
Text=CDU
AntiAlias=1
UpdateDivider=-1
Container=CONTAINER_CPU

[StCPUCAUTIONUsage]
ImageName=#Images1#caution.png
ImageAlpha=[mCPUAVWa]
ImageTint=#Color3##Alpha3#
AntiAlias=1
UpdateDivider=1
DynamicVariables=1
CONTAINER=CONTAINER_CPU
W=20
H=18

[StCPUUsageCur]
Padding=-1,-2,-1,-6
SolidColor=#Color0##Alpha0#
FontColor=#Color7##Alpha3#
FontFace=#FontFace#
StringAlign=RIGHT
FontSize=#FS2#
Text=[mCPU_AV:2]%
AntiAlias=1
DynamicVariables=1
CONTAINER=CONTAINER_CPU
Group=CPU_AV

[StCPUUsageMIN]
Padding=1,-3,1,-5
SolidColor=#Color0##Alpha0#
FontColor=#Color8##Alpha3#
FontFace=#FontFace#
StringAlign=RIGHT
FontSize=#FS3#
Text=[mCPUUsageMIN:2]%
AntiAlias=1
DynamicVariables=1
W=#MinMaxWidth#
Container=CONTAINER_CPU
Group=CPU_AV

[StCPUUsageMAX]
Padding=1,-3,1,-5
SolidColor=#Color0##Alpha0#
FontColor=#Color2##Alpha3#
FontFace=#FontFace#
StringAlign=RIGHT
FontSize=#FS3#
Text=[mCPUUsageMAX:2]%
AntiAlias=1
DynamicVariables=1
W=#MinMaxWidth#
Container=CONTAINER_CPU
Group=CPU_AV

;=== MEASURES CPU-AVERAGE =========================

[mCPU_AV]
Measure=PLUGIN
Plugin=UsageMonitor
Category="Processor Information"
Counter="% Processor Utility"
Name="0,_Total"
IfCondition= (mCPU_AV >= 0 ) && (mCPU_AV <=70)
IfTrueAction= [!DisableMeasure mCPUAVWa][!SetOption CPUUsageCur FontColor #Color6##Alpha3#][!HideMeter CPU_CAUTION_USAGE][!SetOption CPU_USAGE_AV_BAR TRI_AV "StrokeWidth 11 | Stroke Color #Color6##Alpha3# | StrokeEndCap Triangle | Rotate 90"][!UpdateMeterGroup CPU_AV][!Redraw]
IfCondition2=(mCPU_AV >= 71) && (mCPU_AV <= 99)
IfTrueAction2=[!EnableMeasure mCPUAVWa][!SetOption CPUUsageCur FontColor #Color5##Alpha3#][!ShowMeter CPU_CAUTION_USAGE][!SetOption CPU_USAGE_AV_BAR TRI_AV "StrokeWidth 11 | Stroke Color #Color5##Alpha3# | StrokeEndCap Triangle | Rotate 90"][!UpdateMeterGroup CPU_AV][!Redraw]
IfCondition3=mCPU_AV >= 100
IfTrueAction3=[!EnableMeasure mCPUAVWa][!SetOption CPUUsageCur FontColor #Color3##Alpha3#][!ShowMeter CPU_CAUTION_USAGE][!SetOption CPU_USAGE_AV_BAR TRI_AV "StrokeWidth 11 | Stroke Color #Color3##Alpha3# | StrokeEndCap Triangle | Rotate 90"][!UpdateMeterGroup CPU_AV][!Redraw]
OnChangeAction=[!SetOption mCPUUsageMIN Formula "(Min(mCPU_AV,mCPUUsageMIN))"][!SetOption mCPUUsageMAX Formula "(Max(mCPU_AV,mCPUUsageMAX))"]

[mCPUUsageMIN]
Measure=CALC
Formula=( Min ( mCPU_AV, 100 ))
OnChangeAction=[!SetOption CPUUsageMIN SolidColor "#Color3##Alpha2#"][!SetOption CPU_USAGE_AV_BAR TRIMIN "StrokeWidth 11 | Stroke Color #Color3##Alpha2# | StrokeStartCap Triangle | Rotate 90"][!UpdateMeterGroup CPU_AV][!Redraw][!Delay 400][!SetOption CPUUsageMIN SolidColor "#Color0##Alpha0#"][!SetOption CPU_USAGE_AV_BAR TRIMIN "StrokeWidth 11 | Stroke Color #Color8##Alpha2# | StrokeStartCap Triangle | Rotate 90"][!UpdateMeterGroup TEMP][!Redraw]

[mCPUUsageMAX]
Measure=CALC
Formula=( Max ( mCPU_AV, 0 ))
OnChangeAction=[!SetOption CPUUsageMAX SolidColor "#Color3##Alpha2#"][!SetOption CPU_USAGE_AV_BAR TRIMAX "StrokeWidth 11 | Stroke Color #Color3##Alpha2# | StrokeStartCap Triangle | Rotate 90"][!UpdateMeterGroup CPU_AV][!Redraw][!Delay 400][!SetOption CPUUsageMAX SolidColor "#Color0##Alpha0#"][!SetOption CPU_USAGE_AV_BAR TRIMAX "StrokeWidth 11 | Stroke Color #Color2##Alpha2# | StrokeStartCap Triangle | Rotate 90"][!UpdateMeterGroup CPU_AV][!Redraw]

[mCPUAVWa]
Measure=CALC
Formula=(1-mCPUAVWa)
Substitute="0":"0","1":"255"
Disabled=1

;==================================================
;=== CONTAINERS FOR CPU-METER =====================
;==================================================

[CONTAINER_CPU]
Meter=IMAGE
SolidColor=#Color1##Alpha3#
W=#W#
H=#H#
X=0
Y=0
UpdateDivider=-1

;==================================================
;=== BACKGROUND/GRAPHIC ELEM. & CPU VENDOR/MODEL ==
;==================================================

;=== MAIN BACKGROUND ==============================

[BG_MAIN]
Meter=IMAGE
MeterStyle=StBG_MAIN
X=0
Y=0

;=== BACKGROUND FRAME ELEMENTS ====================

[CPU_BG_FRAMES]
Meter=SHAPE
X=0
Y=0
Shape  =Line      0  ,42 ,70 ,42  | StrokeWidth 1 | Stroke Color [mHWINFOCheck]
Shape2 =Line      0  ,100,70 ,100 | StrokeWidth 1 | Stroke Color [mTASKMGRCheck]
Shape3 =Line      210,263,590,263 | Extend LINE
Shape4 =Line      210,105,254,105 | Extend CPUS
Shape5 =Line      258,105,302,105 | Extend CPUN
Shape6 =Line      306,105,350,105 | Extend CPUO 
Shape7 =Line      361,268,590,268 | StrokeWidth 1 | Stroke Color [mTASKMGRCheck]
Shape8 =Rectangle 361,269,229,41  | Extend BarBG
Shape9 =Line      361,311,590,311 | StrokeWidth 1 | Stroke Color [mTASKMGRCheck]
Shape10=Rectangle 90 ,60 ,109,238 | Extend Frame
Shape11=Rectangle 91 ,61 ,107,236 | Extend BarBG
CPUS =StrokeWidth 3 | Stroke Color #Color4##Alpha1#
CPUN =StrokeWidth 3 | Stroke Color #Color4##Alpha1# 
CPUO =StrokeWidth 3 | Stroke Color #Color4##Alpha1# 
LINE =StrokeWidth 1 | Stroke Color #Color9##Alpha1#
BarBG=StrokeWidth 0 | Fill   Color #Color0##Alpha1#
Frame=StrokeWidth 2 | Stroke Color #Color4##Alpha3# | Fill Color #Color0##Alpha0#
UpdateDivider=1
DynamicVariables=1
CONTAINER=CONTAINER_CPU

;------------------------------------------------------------------------------------------------
;NOTICE: The Multiplier 0.92 is for MAX Average Usage 130% 
;        When your need more than 130%, you must change the Multiplier -> 0,92  
;------------------------------------------------------------------------------------------------

[CPU_USAGE_AV_BAR]
Meter=SHAPE
X=390
Y=38
Shape =Rectangle  37                                    ,22 , 82                                    ,17 | Extend USAGBG 
Shape2=Line       0                                     ,50 , 93                                    ,50 | Extend BAR_BG
Shape3=Line       93                                    ,50 , 119                                   ,50 | Extend BARTMA
Shape4=Line       0                                     ,50 ,(Round (0 + (0.92 * [mCPU_AV:0])))     ,50 | Extend BAR_AV
Shape5=Line      (Round (0 + (0.92 * [mCPU_AV:0])))     ,43 ,(Round (1 + (0.92 * [mCPU_AV:0])))     ,43 | Extend TRI_AV
Shape6=Line      (Round (0 + (0.92 * [mCPUUsageMIN:0]))),57 ,(Round (1 + (0.92 * [mCPUUsageMIN:0]))),57 | Extend TRIMIN
Shape7=Line      (Round (0 + (0.92 * [mCPUUsageMAX:0]))),57 ,(Round (1 + (0.92 * [mCPUUsageMAX:0]))),57 | Extend TRIMAX
USAGBG=StrokeWidth 0  | Fill   Color #Color1##Alpha1#
BAR_BG=StrokeWidth 10 | Stroke Color #Color4##Alpha2# | StrokeDashes 0.2,0.1
BARTMA=StrokeWidth 10 | Stroke Color #Color3##Alpha2# | StrokeDashes 0.2,0.1
BAR_AV=StrokeWidth 10 | Stroke Color #Color1##Alpha2# | StrokeDashes 0.2,0.1
TRI_AV=StrokeWidth 11 | Stroke Color #Color7##Alpha3# | StrokeEndCap   Triangle | Rotate 90
TRIMIN=StrokeWidth 11 | Stroke Color #Color8##Alpha2# | StrokeStartCap Triangle | Rotate 90
TRIMAX=StrokeWidth 11 | Stroke Color #Color2##Alpha2# | StrokeStartCap Triangle | Rotate 90
UpdateDivider=1
DynamicVariables=1
CONTAINER=CONTAINER_CPU
Group=CPU_AV

;=== CPU/CCD CURRENT USAGE AVERAGE LABEL & STATS ==

[CPU_USAGE_AV_LABEL]
Meter=STRING
MeterStyle=StCPUUSAGEAVLABEL
X=-1r
Y=25r

[CPU_CAUTION_USAGE]
Meter=IMAGE
MeterStyle=StCPUCAUTIONUsage
X=-27r
Y=-3r

[CPUUsageCur]
Meter=STRING
MeterStyle=StCPUUsageCur
X=144r
Y=r

[CPUUsageMIN]
Meter=STRING
MeterStyle=StCPUUsageMIN
X=81r
Y=4r

[CPUUsageMAX]
Meter=STRING
MeterStyle=StCPUUsageMAX
X=r
Y=15r
So I hope I have copied in all the parts for the "Usage Average" part.
In addition to the BAR width, I still have the problem that I ALWAYS remain at 0.00% for the min/max values. For all other values (Volt, Speed etc) it works.

Here is a screenshot of the (almost) finished skin. So that you can get an idea of the BARS (shapes) until I have uploaded the complete code/skin.

But now I'm going to bed ^.^;
You do not have the required permissions to view the files attached to this post.
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl:
User avatar
Yincognito
Rainmeter Sage
Posts: 7178
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Variable CPU data but fixed BAR width ... and a 2nd problem

Post by Yincognito »

Generally, the formula to fit measure values ranging in different positive intervals within the same bar width is (BarWidth*MeasureValue/MeasureMaximum), or, alternatively, if you use bar meters with a MeasureName option, you can set the MinValue and MaxValue of that measure accordingly. Apply that to your case and all should be fine. As for the division by 0 thingy, not sure about the logical validity of your formula (see above for its general form), but using 0.000001 instead of 0.00 should avoid the error, since Rainmeter typically uses only the first 5 decimals in such evaluations.
Last edited by Yincognito on February 5th, 2024, 6:50 pm, edited 1 time in total.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16179
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Variable CPU data but fixed BAR width ... and a 2nd problem

Post by balala »

My question: why are you creating shapes using Lines? As far as I can tell, it seems you want to create rectangles, using lines. Doesn't make too much sense in my opinion. There are much more simple ways to create them, using for instance Rectangle parameters, instead of Lines.
Since in your code the shapes look complicated enough, I post here an extremely simple example of how can you create a bar using a Shape meter. This is showing the CPU usage:

Code: Select all

[MeasureCPU]
Measure=CPU

[MeterCPUBar]
Meter=Shape
X=2
Y=2
Shape=Rectangle 0,200,100,(-200*[MeasureCPU]/[MeasureCPU:MaxValue]) | Extend MyModifiers1
MyModifiers1=Fill Color 191,237,239,255 | StrokeWidth 4 | Stroke Color 46,115,31,255
DynamicVariables=1
As you can see, there is one single Shape option on the [MeterCPUBar] Shape meter, which makes this meter way simpler. The height of the bar is controlled by the third parameter of the Rectangle section of Shape option: (-200*[MeasureCPU]/[MeasureCPU:MaxValue]). In this formula, 200 is the complet height of the bar. The - sign makes the bar to increase upward when the value of the measure increases. The [MeasureCPU]/[MeasureCPU:MaxValue] ration is representing the percent (expressed as a number between 0 and 1, not between 0 and 100) of the value of the [MeasureCPU] measure from its largest possible value ([MeasureCPU:MaxValue]).
Hope this makes sense for you and you'll be able to implement the above code into your code. In fact we (I) can't get your code working properly, because it uses a few resources which I don't have. Even if these are not too much, make the activated skin to look weird.
So please let me know if you could implement the above code. If you can't, pack please the config and upload it here.
User avatar
Yincognito
Rainmeter Sage
Posts: 7178
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Variable CPU data but fixed BAR width ... and a 2nd problem

Post by Yincognito »

balala wrote: February 5th, 2024, 6:26 pmwhy are you creating shapes using Lines?
Good question, but it made me realize something that wasn't that obvious the first time I looked at the post from my phone: he's making the "bars" using dashed lines (see the CDU, CDT, CDV and CDW visuals in the screenshot above). Because of how dashes work in the Rainmeter Shapes, it's kind of tricky to do this:

Code: Select all

[Variables]

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,255

---Measures---

[Value1]
Measure=Calc
Formula=Random
UpdateRandom=1
LowBound=0
HighBound=5

[Value2]
Measure=Calc
Formula=Random
UpdateRandom=1
LowBound=0
HighBound=100

[Value3]
Measure=Calc
Formula=Random
UpdateRandom=1
LowBound=0
HighBound=150

---Meters---

[Bars]
Meter=Shape
X=5
Y=10
W=125
H=40
Shape =Rectangle 0, 0,(120*[Value1]/  5),0 | Extend Attrib
Shape2=Rectangle 0,15,(120*[Value2]/100),0 | Extend Attrib
Shape3=Rectangle 0,30,(120*[Value3]/150),0 | Extend Attrib
Attrib=Fill Color 0,0,0,0 | Stroke Color 128,128,128,255 | StrokeWidth 10 | StrokeDashes 0.1,0.4 | StrokeDashOffset 0.0
DynamicVariables=1
because the width of rectangles breaks a consistent dashed outcome (test the sample and you'll see what I mean).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16179
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Variable CPU data but fixed BAR width ... and a 2nd problem

Post by balala »

Yincognito wrote: February 5th, 2024, 8:15 pm Good question, but it made me realize something that wasn't that obvious the first time I looked at the post from my phone: he's making the "bars" using dashed lines (see the CDU, CDT, CDV and CDW visuals in the screenshot above). Because of how dashes work in the Rainmeter Shapes, it's kind of tricky to do this:
Doesn't worth in my opinion to complicate the Shape meters this way. But we'll see...
User avatar
Yincognito
Rainmeter Sage
Posts: 7178
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Variable CPU data but fixed BAR width ... and a 2nd problem

Post by Yincognito »

balala wrote: February 5th, 2024, 8:21 pm Doesn't worth in my opinion to complicate the Shape meters this way. But we'll see...
My bad, the stroke dashes on rectangles will move all over the place and be inconsistent with the expected result here because the stroke follows the shape's perimeter and doesn't represent a straight line. Changing the Shapes to Lines fixes this, and yields the expected result:

Code: Select all

[Variables]

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,255

---Measures---

[Value1]
Measure=Calc
Formula=Random
UpdateRandom=1
LowBound=0
HighBound=5
MinValue=0
MaxValue=5

[Value2]
Measure=Calc
Formula=Random
UpdateRandom=1
LowBound=0
HighBound=100
MinValue=0
MaxValue=100

[Value3]
Measure=Calc
Formula=Random
UpdateRandom=1
LowBound=0
HighBound=150
MinValue=0
MaxValue=150

---Meters---

[Bars]
Meter=Shape
X=5
Y=10
W=125
H=40
Shape =Line 0, 0,(120*[Value1:%]/100), 0 | Extend Attrib
Shape2=Line 0,15,(120*[Value2:%]/100),15 | Extend Attrib
Shape3=Line 0,30,(120*[Value3:%]/100),30 | Extend Attrib
Attrib=Fill Color 0,0,0,0 | Stroke Color 128,128,128,255 | StrokeWidth 10 | StrokeDashes 0.1,0.4 | StrokeDashOffset 0.0
DynamicVariables=1
I used MinValue, MaxValue and a section variable's percentual value in this version, in order to move the minimums and maximums from the meter to the measures instead. It's more natural this way, since it doesn't require editing the meter when the particularities of the measures change.

Well, this case is not that complicated to not worth the trouble, IMHO. :confused:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Variable CPU data but fixed BAR width ... and a 2nd problem

Post by eclectic-tech »

Yincognito wrote: February 5th, 2024, 8:47 pm My bad, the stroke dashes on rectangles will move all over the place and be inconsistent with the expected result here because the stroke follows the shape's perimeter and doesn't represent a straight line. Changing the Shapes to Lines fixes this, and yields the expected result:

{code clipped}
Well, this case is not that complicated to not worth the trouble, IMHO. :confused:
I am happy to see people looking at uses for the StrokeDashes parameter of the Shape meter. It has many uses in shape strokes but is sadly neglected.

So, kudos to Youkai1977 and Yincognito for demonstrating some of the StrokeDash abilities.

I expanded Yincognito's demo skin with some added text, alternate dash/gap settings, colors, and expandable width.
Sorry Yincognito, I couldn't help myself :Whistle
dashgap.gif
Code:

Code: Select all

[Variables]
; 200 to ??
BarWidth=250

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,255
MouseScrollUpAction=[!WriteKeyValue Variables BarWidth (Clamp(#BarWidth#+25,150,750))][!Refresh]
MouseScrollDownAction=[!WriteKeyValue Variables BarWidth (Clamp(#BarWidth#-25,150,750))][!Refresh]

---Measures---

[Value1]
Measure=Calc
Formula=Random
UpdateRandom=1
LowBound=0
HighBound=5
MinValue=0
MaxValue=5

[Value2]
Measure=Calc
Formula=Random
UpdateRandom=1
LowBound=0
HighBound=100
MinValue=0
MaxValue=100

[Value3]
Measure=Calc
Formula=Random
UpdateRandom=1
LowBound=0
HighBound=250
MinValue=0
MaxValue=250

---Meters---

[Title]
Meter=String
X=(#BarWidth#*0.62)
FontColor=220,220,220
StringAlign=Center
Text=Stroke Dash/Gap Line Bars

[Value1Label]
Meter=String
MeasureName=Value1
Y=20
FontColor=255,255,255

[Value2Label]
Meter=String
MeasureName=Value2
Y=34
FontColor=255,255,255

[Value3Label]
Meter=String
MeasureName=Value3
Y=48
FontColor=255,255,255

[Grid]
Meter=Shape
X=25
Y=([Value1Label:Y])
Shape=Rectangle 0,0,#BarWidth#,40 | StrokeWidth 0 | Fill Color 32,32,32,255


[Bars]
Meter=Shape
X=25
Y=([Value1Label:Y]+5)
W=(#BarWidth#+5)
H=40
Shape =Line 0, 0,(#BarWidth#*[Value1:%]/100), 0 | Extend Attrib1
Shape2=Line 0,15,(#BarWidth#*[Value2:%]/100),15 | Extend Attrib2
Shape3=Line 0,30,(#BarWidth#*[Value3:%]/100),30 | Extend Attrib3
Attrib1=Fill Color 0,0,0,0 | Stroke Color 228,28,28,255 | StrokeWidth 10 | StrokeDashes 0.4,0.1 | StrokeDashOffset 0.0
Attrib2=Fill Color 0,0,0,0 | Stroke Color 28,228,28,255 | StrokeWidth 10 | StrokeDashes 0.1,0.4 | StrokeDashOffset 0.0
Attrib3=Fill Color 0,0,0,0 | Stroke Color 68,108,228,255 | StrokeWidth 10 | StrokeDashes 0.3,0.2 | StrokeDashOffset 0.0
DynamicVariables=1

[Range1]
Meter=String
X=([Bars:XW]+5)
Y=20
FontColor=255,255,255
Text=0 ~ 5.0
DynamicVariables=1

[Range2]
Meter=String
X=([Bars:XW]+5)
Y=34
FontColor=255,255,255
Text=0 ~ 100
DynamicVariables=1

[Range3]
Meter=String
X=([Bars:XW]+5)
Y=48
FontColor=255,255,255
Text=0 ~ 250
DynamicVariables=1
You do not have the required permissions to view the files attached to this post.
User avatar
Youkai1977
Posts: 164
Joined: October 31st, 2018, 4:11 pm
Location: Germany

Re: Variable CPU data but fixed BAR width ... and a 2nd problem

Post by Youkai1977 »

Good morning everyone,

Oh my God, so many answers/help. Thank you so much. :bow:
I'll have to take a look at your answers/help and go through them. I don't have much time at the moment and I also have a bad cold.

But what I have done, as promised and requested by "balala", I upload the complete skin as *.rmskin file.
I hope I haven't forgotten anything and the meter is running.

->> OF COURSE HWiNFO & Speech-PlugIn IS REQUIRED, and if possible/better i think, when the OS on your PC should be Win11 from 22H2 <<-

The latter has to do with the USAGE evaluation. I found something about this in the forum these days, and implemented it in my CPU meter accordingly, because I run Win11 23H2 and had a problem where the thread mentioned here in the forum helped me.

One more request, the look (graphics) of my CPU meter are based on an idea I found on the internet. That means, the graphics are created by me, but since they are (almost) 100% identical to the original, I don't know to what extent I might be violating any rights. But I didn't think about it, because I usually only write/create my skins for use on my PC.

Here the Link: -> https://www.artstation.com/marketplace/p/RDve/fui-ui-screen-graphics-menu-set

I'll add the link where I got the graphic idea from. So maybe those of you who know more about it can decide for themselves whether my skin can remain available for download or whether it should be removed.

As I said, I have already roughly skimmed through your answers and have also seen one or two approaches/possible solutions. But I'll have to take a closer look at it. And I don't really have that right now.

But I'll definitely give you feedback :-)
You do not have the required permissions to view the files attached to this post.
- Win11 Pro x64 (23H2 - 22631.3085)
- Rainmeter 4.5.18
- Gigabyte B550i AORUS Pro AX V1.2
- Corsair Venegeance LPX 2x 16GB (32GB) DDR4 3200MHz
- RYZEN 7 5800X
- PowerColor RX570 8GB
- Samsung 980Pro 250GB (NVMe) - Drive C: Windows
- Kingston SNV2S1000G (NVMe) - Drive D: Rainmeter, Skins & Others - Drive D: Games
- NAS Synology DS216j - 2x 1GB HDDs - My Main Backup & Data Storage in my Home-Network
- Mon 1: 24" HP 24f (1920 x 1080 @ 75Hz) - Primary
- Mon 2: 22" Philips 226VL (1920 x 1080 @ 60Hz) - Secondary 1
- Mon 3: 50" Philips 50PUS7304/12 (3840 x 2160 @ 60Hz) - Secondary 2
- Corsair CX 650M Power Supply
- NZXT H210 Case
- ISP Vodafone with 1000/50 Mbit Cable Internet

The absolutly High-End Machine on 2024 ... at least the graphics card :oops: O.O :rofl:
User avatar
Yincognito
Rainmeter Sage
Posts: 7178
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Variable CPU data but fixed BAR width ... and a 2nd problem

Post by Yincognito »

eclectic-tech wrote: February 6th, 2024, 2:10 am I am happy to see people looking at uses for the StrokeDashes parameter of the Shape meter. It has many uses in shape strokes but is sadly neglected.
I certainly don't neglect it, it's part of my (unreleased, yet) Screen Ruler skin, which might be released some day if I find an easier way to capture screenshots (including GIF) of the selected area. Yes, I know that nek, if I'm not mistaken, already has a skin doing that, but I'm looking at no additional dependencies (like NirCmd) and GIF abilities. There are some PowerShell methods to do that, but I'd like to avoid precompiled C code as well, if possible.

But I digress, yes, there are some less used parts of Rainmeter (another example is the WindowMessage plugin, where I have an unfinished skin facilitating its use too), though once in a while you see other people using them. Such less usage is partly based on the perceived complexity of the feature, partly based on less need for it, and, why not, partly based on the less mainstream usage of Rainmeter itself (which at times is an advantage since it doesn't yet make the mistakes of other more mainstream applications).
eclectic-tech wrote: February 6th, 2024, 2:10 am Sorry Yincognito, I couldn't help myself :Whistle
Don't worry, eclectic-tech, feel free to play with it. I actually did almost the same, lol, just didn't post it as it was too late and I reckoned the message was already read. I like Youkai1977's layout too, I forgot to say that earlier. :D
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16179
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Variable CPU data but fixed BAR width ... and a 2nd problem

Post by balala »

eclectic-tech wrote: February 6th, 2024, 2:10 am I am happy to see people looking at uses for the StrokeDashes parameter of the Shape meter. It has many uses in shape strokes but is sadly neglected.
I didn't neglected it. Simply didn't know about it! Shape meter is so complex, that I can't follow all of its parameters.
Thank you for letting me know about this feature. Will have to take a deeper look.