Hi everyone!
first, I'm sorry for my bad English. I'll explain as good as I can.
I have a question, for example, I'm getting the Clock Hour out of [MeasureTime] (ex: 13h33m), now I need to devide the clock hour (13) in to two Digits to work with. Like the example, the first digit which is 1 to be fill by the usage of CPU %, the second digit which is 3 to be fill by RAM usage, or HDD, download, upload speed, etc... Can I do that?
Thank you!
It is currently April 26th, 2024, 2:14 pm
Need Help on Rainmeter Time value
-
- Posts: 2
- Joined: May 15th, 2018, 12:13 pm
-
- Developer
- Posts: 22630
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Need Help on Rainmeter Time value
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[MeasureTime]
Measure=Time
Format=%H:%M
[MeasureHour1]
Measure=String
String=[MeasureTime]
RegExpSubstitute=1
Substitute="(\d)\d:.*":"\1"
DynamicVariables=1
[MeasureHour2]
Measure=String
String=[MeasureTime]
RegExpSubstitute=1
Substitute="\d(\d):.*":"\1"
DynamicVariables=1
[MeasureMinute1]
Measure=String
String=[MeasureTime]
RegExpSubstitute=1
Substitute=".*:(\d)\d":"\1"
DynamicVariables=1
[MeasureMinute2]
Measure=String
String=[MeasureTime]
RegExpSubstitute=1
Substitute=".*:\d(\d)":"\1"
DynamicVariables=1
[MeterDummy]
Meter=Image
You do not have the required permissions to view the files attached to this post.
-
- Developer
- Posts: 22630
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Need Help on Rainmeter Time value
Then filling the characters based on a percentage is like this:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
BarColor=100,255,100,255
TextColor=200,255,200,255
; 0 (360) = RightToLeft
; 90 = BottomToTop
; 180 = LeftToRight
; 270 = TopToBottom
[MeterBack]
Meter=Image
W=555
H=70
SolidColor=20,20,20,255
[MeasureCPU]
Measure=CPU
IfCondition=(MeasureCPU >= 30)
IfTrueAction=[!SetVariable BarColor 250,100,100,255][!SetVariable TextColor 255,200,200,255][!UpdateMeter *][!Redraw]
IfFalseAction=[!SetVariable BarColor 100,255,100,255][!SetVariable TextColor 200,255,200,255][!UpdateMeter *][!Redraw]
[MeterGradient]
Meter=String
MeasureName=MeasureCPU
X=10
Y=10
FontSize=35
FontWeight=700
AntiAlias=1
DynamicVariables=1
Text=CPU PERCENTAGE
InlineSetting=GradientColor | 180 | #BarColor# ; ([MeasureCPU]/100) | #TextColor# ; ([MeasureCPU]/100) | #TextColor# ; 1.0
InlinePattern=.*
; The key to this is that the second "point" is defined at the same place as the first "point".
; This will cause a transition from the first to the second color that is zero percent "wide",
; Which will cleanly change the color from the first to the second at the point of the value.
[MeterPercent]
Meter=String
MeasureName=MeasureCPU
X=545
Y=10
FontSize=35
FontColor=#BarColor#
FontWeight=700
StringAlign=Right
AntiAlias=1
DynamicVariables=1
Text=%1%
-
- Developer
- Posts: 22630
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Need Help on Rainmeter Time value
If you put them together, you might get something like this:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
BarColor=100,255,100,255
TextColor=200,255,200,255
; 0 (360) = RightToLeft
; 90 = BottomToTop
; 180 = LeftToRight
; 270 = TopToBottom
Drive1=C:
[MeasureTime]
Measure=Time
Format=%H:%M
[MeasureHour1]
Measure=String
String=[MeasureTime]
RegExpSubstitute=1
Substitute="(\d)\d:.*":"\1"
DynamicVariables=1
[MeasureHour2]
Measure=String
String=[MeasureTime]
RegExpSubstitute=1
Substitute="\d(\d):.*":"\1"
DynamicVariables=1
[MeasureMinute1]
Measure=String
String=[MeasureTime]
RegExpSubstitute=1
Substitute=".*:(\d)\d":"\1"
DynamicVariables=1
[MeasureMinute2]
Measure=String
String=[MeasureTime]
RegExpSubstitute=1
Substitute=".*:\d(\d)":"\1"
DynamicVariables=1
[MeasureLabelDrive1]
Measure=FreeDiskSpace
Drive=#Drive1#
Label=1
IgnoreRemovable=0
UpdateDivider=2
[MeasureTotalDrive1]
Measure=FreeDiskSpace
Drive=#Drive1#
Total=1
IgnoreRemovable=0
UpdateDivider=2
[MeasureFreeDrive1]
Measure=FreeDiskSpace
Drive=#Drive1#
IgnoreRemovable=0
UpdateDivider=2
MaxValue=[MeasureTotalDrive1]
DynamicVariables=1
[MeasureUsedDrive1]
Measure=FreeDiskSpace
Drive=#Drive1#
InvertMeasure=1
IgnoreRemovable=0
UpdateDivider=2
MaxValue=[MeasureTotalDrive1]
DynamicVariables=1
[MeterUsedDrive1Hour1]
Meter=String
MeasureName=MeasureHour1
FontSize=100
StringStyle=Bold
AntiAlias=1
DynamicVariables=1
InlineSetting=GradientColor | 90 | #BarColor# ; ([MeasureUsedDrive1:%]/100) | #TextColor# ; ([MeasureUsedDrive1:%]/100) | #TextColor# ; 1.0
InlinePattern=.*
You do not have the required permissions to view the files attached to this post.
-
- Posts: 2
- Joined: May 15th, 2018, 12:13 pm
-
- Developer
- Posts: 22630
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Need Help on Rainmeter Time value
Glad to help.