It is currently March 29th, 2024, 5:47 am

Is there a way to have a meter's X value be dynamic?

Get help with creating, editing & fixing problems with skins
-guy-
Posts: 3
Joined: November 16th, 2020, 10:00 am

Is there a way to have a meter's X value be dynamic?

Post by -guy- »

I want to make a skin that measures CPU temps, and I want a text telling you the exact temps on top of a bar which represents the tempature.

Heres my code.

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
MiddleMouseDownAction=[!WriteKeyValue Variables Color1 #Color2#][!WriteKeyValue Variables Color2 #Color3#][!WriteKeyValue Variables Color3 #Color1#][!WriteKeyValue Variables Shade1 #Shade2#][!WriteKeyValue Variables Shade2 #Shade3#][!WriteKeyValue Variables Shade3 #Shade1#][!WriteKeyValue Variables Line1 #Line2#][!WriteKeyValue Variables Line2 #Line3#][!WriteKeyValue Variables Line3 #Line1#][!Refresh]

[Metadata]
Author=Fonpaolo |  Yash1331
Name=CPU Display (8 Cores)
Information=Displays the current CurrentValue of each core of the CPU (8 Cores). | Mouse over "CPU" will show other informations. | Use the Options skin to show or hide the total CPU CurrentValue (Other). | Middle mouse button changes the color.
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Version=2.1.6-1

[Variables]
@include=#@#Config.inc
@include2=#@#HWiNFO.inc
Color1=Blue
Color2=Orange
Color3=Red
Shade1=#Shade3#
Shade2=#Shade3#
Shade3=#Shade3#
Line1=#Line3#
Line2=#Line3#
Line3=#Line3#

;COREs ------------------------------------------------------------

[MeasureCore1]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=#CPUTemp-SensorId#
HWiNFOSensorInstance=#CPUTemp-SensorInstance#
HWiNFOEntryId=#Core1Temp#
HWiNFOType=CurrentValue
HWiNFOLogHandler=2
MinValue=0
MaxValue=100

[MeasureCore2]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=#CPUTemp-SensorId#
HWiNFOSensorInstance=#CPUTemp-SensorInstance#
HWiNFOEntryId=#Core2Temp#
HWiNFOType=CurrentValue
HWiNFOLogHandler=2
MinValue=0
MaxValue=100

[MeasureCore3]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=#CPUTemp-SensorId#
HWiNFOSensorInstance=#CPUTemp-SensorInstance#
HWiNFOEntryId=#Core3Temp#
HWiNFOType=CurrentValue
HWiNFOLogHandler=2
MinValue=0
MaxValue=100

[MeasureCore4]
Measure=Plugin
Plugin=HWiNFO.dll
HWiNFOSensorId=#CPUTemp-SensorId#
HWiNFOSensorInstance=#CPUTemp-SensorInstance#
HWiNFOEntryId=#Core4Temp#
HWiNFOType=CurrentValue
HWiNFOLogHandler=2
MinValue=0
MaxValue=100

;Bars=======================
[MeterBorder]
Meter=Image
ImageName=Bars_case

[Meter4CoreBar1]
Meter=Bar
MeasureName=MeasureCore1
BarImage=BAR
x=2r
y=-1r
AntiAlias=1

[Meter4CoreBar2]
Meter=Bar
MeasureName=MeasureCore2
BarImage=BAR
x=29r
y=r
AntiAlias=1

[Meter4CoreBar3]
Meter=Bar
MeasureName=MeasureCore3
BarImage=BAR
x=29r
y=r
AntiAlias=1

[Meter4CoreBar4]
Meter=Bar
MeasureName=MeasureCore4
BarImage=BAR
x=29r
y=r
AntiAlias=1

;Text Meters===============================

[TextMeter1]
DynamicVariables=1
Meter=string
MeasureName=MeasureCore1
x=#Core1#
FontColor=255,255,255,255
You guys requested a picture:
Untitled.png
You do not have the required permissions to view the files attached to this post.
Last edited by -guy- on November 16th, 2020, 2:47 pm, edited 1 time in total.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Is there a way to have a meter's X value be dynamic?

Post by eclectic-tech »

Yes.

Something like this?
Image

To test "your" code, we need the included files "HWiNFO.inc" and "Config.inc"
-guy-
Posts: 3
Joined: November 16th, 2020, 10:00 am

Re: Is there a way to have a meter's X value be dynamic?

Post by -guy- »

eclectic-tech wrote: November 16th, 2020, 10:42 am Yes.

Something like this?
Image

To test "your" code, we need the included files "HWiNFO.inc" and "Config.inc"
No not like that, I want it so x position of a meter to change depending on how tall the bar is. "#core1#" isn't a real variable, it's just there by accident. I want something like this.
Untitled.png
You do not have the required permissions to view the files attached to this post.
Last edited by -guy- on November 16th, 2020, 2:48 pm, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Is there a way to have a meter's X value be dynamic?

Post by jsmorley »

Please attach the image to a post. We don't have view access rights to the link you used.
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: Is there a way to have a meter's X value be dynamic?

Post by Active Colors »

I suppose he wants something like this:
Image

https://www.deviantart.com/boyzonet/art/Vertical-Meter-for-XWidget-286354996

Let us know.
-guy-
Posts: 3
Joined: November 16th, 2020, 10:00 am

Re: Is there a way to have a meter's X value be dynamic?

Post by -guy- »

Active Colors wrote: November 16th, 2020, 12:33 pm I suppose he wants something like this:
Image

https://www.deviantart.com/boyzonet/art/Vertical-Meter-for-XWidget-286354996

Let us know.
That's almost exactly what I want. I want something more like this.
Untitled.png
You do not have the required permissions to view the files attached to this post.
User avatar
FreeRaider
Posts: 826
Joined: November 20th, 2012, 11:58 pm

Re: Is there a way to have a meter's X value be dynamic?

Post by FreeRaider »

-guy- wrote: November 16th, 2020, 10:07 am I want to make a skin that measures CPU temps, and I want a text telling you the exact temps on top of a bar which represents the tempature.
I don't understand.

Do you want something like this?
GIF 22-11-2020 12-00-40.gif

Code: Select all

[Rainmeter]
Update=100
DynamicWindowSize=1
AccurateText=1

[Variables]

[MeasureLoop]
Measure=Loop
StartValue=0
EndValue=100

[MeasurePercent]
Measure=Calc
Formula=MeasureLoop / 100


[Meter4CoreBar1Text]
Meter=String
X=0
Y=0
FontColor=255,0,0,255
Text=[MeasurePercent:%]%
AntiAlias=1
DynamicVariables=1

[Meter4CoreBar1]
Meter=Bar
MeasureName=MeasurePercent
; BarImage=BAR
X=2r
Y=0R
W=250
H=30
BarColor=255,189,10,255
SolidColor=0,0,0,255
AntiAlias=1
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Is there a way to have a meter's X value be dynamic?

Post by balala »

-guy- wrote: November 16th, 2020, 10:07 am I want to make a skin that measures CPU temps, and I want a text telling you the exact temps on top of a bar which represents the tempature.
My guess:

Code: Select all

[Rainmeter]
Update=1000

[MeasureVal]
Measure=Calc
Formula=( COUNTER % 100 )
MinValue=0
MaxValue=100

[MeterValBar]
MeasureName=MeasureVal
Meter=BAR
X=0
Y=0
W=250
H=30
BarColor=185,250,160,255
SolidColor=150,150,150,255
BarOrientation=Horizontal

[MeterVal]
Meter=STRING
MeasureName=MeasureVal
X=([MeasureVal]*[MeterValBar:W]/[MeasureVal:MaxValue])
Y=([MeterValBar:H]/2)
Padding=5,5,5,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFTCENTER
AntiAlias=1
Text=%1%
DynamicVariables=1
GIF.gif
Is this what you want to achieve?
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Is there a way to have a meter's X value be dynamic?

Post by eclectic-tech »

The images posted by the OP are useless, but the description says they want a changing X (horizontal) value text based on how the image height (vertically) so, using Freeraider's code (slightly modified to shift the text based on a vertical bar) gives you this:
barx.gif
Which may be closer to what the OP described.

Code: Select all

[Rainmeter]
Update=100
DynamicWindowSize=1
AccurateText=1

[Variables]

[MeasureLoop]
Measure=Loop
StartValue=0
EndValue=100

[MeasurePercent]
Measure=Calc
Formula=MeasureLoop / 100


[Meter4CoreBar1Text]
Meter=String
X=(220*[MeasurePercent:])
Y=0
FontColor=255,189,10,255
Text=[MeasurePercent:%]%
AntiAlias=1
DynamicVariables=1

[Meter4CoreBar1]
Meter=Bar
MeasureName=MeasurePercent
; BarImage=BAR
X=2
Y=0R
W=250
H=30
BarColor=255,189,10,255
SolidColor=0,0,0,255
AntiAlias=1
At least now there are multiple examples to choose from depending how the desired effect... :welcome:
You do not have the required permissions to view the files attached to this post.