Page 1 of 2

DiskSpace Measure Problem

Posted: November 11th, 2018, 1:06 pm
by Slim08
I can't figure out how to make the "HD1 (C:) Warning" part work with the disk space measurements - my guess it's because #measureUsedHD1# and #measureTotalHD1# return a value that is in bytes and the [measureHD1GBCalc] calculation from those values will give some crazy long string of numbers that have to be converted in percentage in order to work but simply adding #Percentual=1# doesn't work and I don't know why.

Code: Select all

[Rainmeter]
Background=#@#Background.png
BackgroundMode=3
BackgroundMargins=0,0,0,2

[Metadata]
Author=Slim08
AppVersion=v1.0

[Variables]
fontName=Segoe UI
textSize=8
percentRightAligned=244
diskLabelLeftAligned=30
colorText=255,255,255,205
colorText2=255,255,255,100
colorBar=255,138,0,200
colorBarBackground=255,255,255,15
hightBar=2
widthBar=230
relativeDistanceLableBar=4r
relativeDistanceBarLable=15r
HD1=C:

[styleLeftText]
StringAlign=LEFT
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1

[styleCenterText]
StringAlign=CENTER
FontColor=#HD1TextWarn#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1

[styleRightText]
StringAlign=RIGHT
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1

;___________________________________________________________________TITLE
[styleTitle]
StringAlign=CENTER
StringEffect=SHADOW
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
FontWeight=600
AntiAlias=1

[meterTitle]
Meter=STRING
MeterStyle=styleTitle
X=127
Y=7
Text="Laufwerke"

;___________________________________________________________________HD1 (C:)
[measureTotalHD1]
Measure=FreeDiskSpace
Drive=#HD1#
Total=1
UpdateDivider=120

[measureFreeHD1]
Measure=FreeDiskSpace
Drive=#HD1#
UpdateDivider=120
DynamicVariables=1

[measureUsedHD1]
Measure=FreeDiskSpace
Drive=#HD1#
UpdateDivider=120
InvertMeasure=1
DynamicVariables=1

[DiskImage]
Meter=IMAGE
ImageName=#@#Disk.png
ImageTint=255,255,255,205
X=11
Y=25
LeftMouseUpAction=#HD1#
LeftMouseUpAction=[!RefreshApp]
MouseOverAction=[!SetOption DiskImage ImageTint 255,138,0,255][!UpdateMeter DiskImage][!Redraw]
MouseLeaveAction=[!SetOption DiskImage ImageTint 255,255,255,205][!UpdateMeter DiskImage][!Redraw]
ToolTipText=#HD1#

[meterLabelHD1]
Meter=STRING
MeterStyle=styleLeftText
X=#diskLabelLeftAligned#
Y=4r
Text="#HD1#"

[meterValueHD1]
Meter=STRING
MeterStyle=styleCenterText
MeasureName=measureFreeHD1
MeasureName2=measureTotalHD1
X=127
Y=r
H=28
Text="%1B frei von %2B"
NumOfDecimals=2
AutoScale=1
; Because disk measures return the free/used space in bytes, we must use AutoScale=1 to
; automatically scale the value into a more readable figure.

[meterPercentHD1]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureUsedHD1
X=#percentRightAligned#
Y=29
Text="%1%"
Percentual=1
DynamicVariables=1
;NumofDecimals=1

[meterBarHD1]
Meter=BAR
MeasureName=measureUsedHD1
X=12
Y=#relativeDistanceBarLable#
W=#widthBar#
H=#hightBar#
BarColor=#meterBarHD1Warn#
SolidColor=#colorBarBackground#
BarOrientation=HORIZONTAL
DynamicVariables=1
Autoscale=1

;___________________________________________________________________HD1 (C:) Warning
[measureHD1GBCalc]
Measure=Calc
Formula=measureUsedHD1 * 100 / measureTotalHD1

[measureHD1GBCalc3]
Measure=Calc
Formula=measureHD1GBCalc
MinValue=0
MaxValue=100

[meterBarHD1Warn]
Measure=Calc
Formula=measureHD1GBCalc2> 90 ? -1 : -2
Substitute="-1":"255,0,0,200","-2":"#colorBar#"

[HD1TextWarn]
Measure=Calc
Formula=measureHD1GBCalc2< 30 ? -1 : (measureHD1GBCalc2< 45 ? -2 : (measureHD1GBCalc2< 60 ? -3 : (measureHD1GBCalc2< 75 ? -4 : -5)))
Substitute="-1":"#colorText2#","-2":"255,200,153,100","-3":"255,175,102,100","-4":"255,150,51,150","-5":"255,0,0,150"

Re: DiskSpace Measure Problem

Posted: November 11th, 2018, 1:25 pm
by jsmorley
It's more just that you have lost track of what you are calling these various measures.

Code: Select all

[measureHD1GBCalc1]
Measure=Calc
Formula=(measureUsedHD1 / measureTotalHD1) * 100

[meterBarHD1Warn]
Measure=Calc
Formula=measureHD1GBCalc1 > 30 ? -1 : -2
Substitute="-1":"255,0,0,200","-2":"#colorBar#"

[HD1TextWarn]
Measure=Calc
Formula=measureHD1GBCalc1 < 30 ? -1 : (measureHD1GBCalc1< 45 ? -2 : (measureHD1GBCalc1< 60 ? -3 : (measureHD1GBCalc1< 75 ? -4 : -5)))
Substitute="-1":"#colorText2#","-2":"255,200,153,100","-3":"255,175,102,100","-4":"255,150,51,150","-5":"255,0,0,150"
Just need to be consistent and accurate with the measure names.

Re: DiskSpace Measure Problem

Posted: November 11th, 2018, 1:34 pm
by Slim08
jsmorley wrote: November 11th, 2018, 1:25 pm It's more just that you have lost track of what you are calling these various measures.

Code: Select all

[measureHD1GBCalc1]
Measure=Calc
Formula=(measureUsedHD1 / measureTotalHD1) * 100

[meterBarHD1Warn]
Measure=Calc
Formula=measureHD1GBCalc1 > 30 ? -1 : -2
Substitute="-1":"255,0,0,200","-2":"#colorBar#"

[HD1TextWarn]
Measure=Calc
Formula=measureHD1GBCalc1 < 30 ? -1 : (measureHD1GBCalc1< 45 ? -2 : (measureHD1GBCalc1< 60 ? -3 : (measureHD1GBCalc1< 75 ? -4 : -5)))
Substitute="-1":"#colorText2#","-2":"255,200,153,100","-3":"255,175,102,100","-4":"255,150,51,150","-5":"255,0,0,150"
Just need to be consistent and accurate with the measure names.
Yeah that was one typo from something I did try a minute before I posted that code - but it still doesn't work

Re: DiskSpace Measure Problem

Posted: November 11th, 2018, 1:37 pm
by jsmorley
I'm not clear about the logic of what you are trying to do. You have some measures that test the percentage of disk space used, and set their own value to a color code based on the result. Where are you using those measures to actually set the color options on Bar or String meters?

Re: DiskSpace Measure Problem

Posted: November 11th, 2018, 1:42 pm
by jsmorley
Take a look at this...

Code: Select all

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

[MeasureTotalDiskSpace]
Measure=FreeDiskSpace
Drive=C:
Total=1
UpdateDivider=5

[MeasureFreeDiskSpace]
Measure=FreeDiskSpace
Drive=C:
UpdateDivider=5

[MeasurePercentFree]
Measure=Calc
Formula=(MeasureFreeDiskSpace / MeasureTotalDiskSpace) * 100
IfCondition=MeasurePercentFree < 30
IfTrueAction=[!SetOption MeterPercentFree FontColor "255,0,0,255"][!UpdateMeter *][!Redraw]
IfFalseAction=[!SetOption MeterPercentFree FontColor "255,255,255,255"][!UpdateMeter *][!Redraw]

[MeterPercentFree]
Meter=String
MeasureName=MeasurePercentFree
FontSize=20
FontWeight=700
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=%1%

Re: DiskSpace Measure Problem

Posted: November 11th, 2018, 1:45 pm
by Slim08
I pretty much copy-pasted the warning part from my GPU skin and tried to adapt it to this one. It works like a charm on the GPU skin.

Code: Select all

[Rainmeter]
Background=#@#Background.png
BackgroundMode=3
BackgroundMargins=0,0,0,2
Update=1000

[Metadata]
Author=Slim08
AppVersion=v1.0

[Variables]
;GPU Name or Title for Skin
GPU1Name=
fontName=Segoe UI
textSize=8
textLeftAligned=10
percentRightAligned=244
colorText=255,255,255,205
colorText2=255,255,255,100
colorBar=255,138,0,200
colorBarBackground=255,255,255,15
hightBar=2
widthBar=230
relativeDistanceLableBar=4r
relativeDistanceBarLable=15r

;__________________________________________________________TITLE
[MeasureGPUName]
Measure=Registry
RegHKey=HKEY_LOCAL_MACHINE
RegKey=SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinSAT
RegValue=PrimaryAdapterString
UpdateDivider=3600
RegExpSubstitute=1
Substitute="\(R\)":"","\(TM\)":""," CPU":"", "  ":"", "@(.*)":"", "APU":"", "with":"", "Radeon":"", "\(tm\):"", "HD":"", "Graphics":""

[styleTitle]
MeasureName=MeasureGPUName
StringAlign=CENTER
StringEffect=SHADOW
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
FontWeight=600
AntiAlias=1

[meterTitle]
Meter=STRING
MeterStyle=styleTitle
X=127
Y=7
Text="#GPU1Name#"

;__________________________________________________________GPU TEMP
[GPU1TempText]
Meter=STRING
X=127
Y=29
MeasureName=GPU1Temp
Text="%1°C"
FontColor=[GPU1TempWarn]
FontSize=#textSize#
NumofDecimals=0
FontFace=#fontName#
StringAlign=CENTER
AntiAlias=1
DynamicVariables=1

[GPU1Temp]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\FinalWire\AIDA64\SensorValues
RegValue=Value.TGPU1DIO

[GPU1TempWarn]
Measure=Calc
Formula=GPU1Temp< 30 ? -1 : (GPU1Temp < 40 ? -2 : (GPU1Temp < 50 ? -3 : (GPU1Temp < 60 ? -4 : -5)))
Substitute="-1":"#colorText1#","-2":"255,200,153","-3":"255,175,102","-4":"255,150,51","-5":"255,0,0"

;__________________________________________________________GPU USAGE
[GPU1UsageText]
Meter=STRING
X=#textLeftAligned#
Y=29
Text="GPU"
FontColor=#colorText#
FontSize=#textSize#
StringAlign=LEFT
FontFace=#fontName#
AntiAlias=1

[GPU1UsagePercent]
Meter=STRING
MeasureName=GPU1CoreUsageCalc
X=#percentRightAligned#
Y=29
FontColor=#colorText#
FontSize=#textSize#
StringAlign=RIGHT
FontFace=#fontName#
AntiAlias=1
Text="%1%"

[GPU1CoreUsageBar]
Meter=BAR
MeasureName=GPU1CoreUsageCalc2
X=12
Y=44
W=#widthBar#
H=#hightBar#
BarColor=[GPU1CoreUsageBarWarn]
SolidColor=#colorBarBackground#
BarOrientation=HORIZONTAL
DynamicVariables=1
Autoscale=1

[GPU1CoreUsage]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\FinalWire\AIDA64\SensorValues
RegValue=Value.SGPU1UTI

[GPU1CoreUsageCalc]
Measure=Calc
Formula=GPU1CoreUsage * 1

[GPU1CoreUsageCalc2]
Measure=Calc
Formula=GPU1CoreUsageCalc
MinValue=0
MaxValue=100
Percentage=1

[GPU1CoreUsageBarWarn]
Measure=Calc
Formula=GPU1CoreUsage> 90 ? -1 : -2
Substitute="-1":"255,0,0,200","-2":"#colorBar#"

;__________________________________________________________MEMORY
[GPU1MemoryUsageString]
Meter=STRING
X=#textLeftAligned#
Y=#relativeDistanceLableBar#
Text=Memory
FontColor=#colorText#
FontSize=#textSize#
StringAlign=LEFT
FontFace=#fontName#
AntiAlias=1

[GPU1MemoryText]
Meter=STRING
X=127
Y=r
MeasureName=GPU1MemoryCalc
Text="%1 MB / [GPUMemoryInMegaBytesCalc] MB"
FontColor=[GPU1MemoryMBTextWarn]
FontSize=#textSize#
StringAlign=CENTER
FontFace=#fontName#
AntiAlias=1
DynamicVariables=1

[GPU1MemoryPercent]
Meter=STRING
X=#percentRightAligned#
Y=r
MeasureName=GPU1MemoryCalc2
FontColor=#colorText#
FontSize=#textSize#
StringAlign=RIGHT
FontFace=#fontName#
AntiAlias=1
Text="%1%"

[GPU1MemUsageBar]
Meter=Bar
MeasureName=GPU1MemoryCalc3
X=12
Y=#relativeDistanceBarLable#
W=#widthBar#
H=#hightBar#
BarColor=[GPU1MemoryBarWarn]
SolidColor=#colorBarBackground#
BarOrientation=HORIZONTAL
DynamicVariables=1
AutoScale=1

[UsedVMEM]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\FinalWire\AIDA64\SensorValues
RegValue=Value.SUSEDVMEM 

[FreeVMEM]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\FinalWire\AIDA64\SensorValues
RegValue=Value.SFREEVMEM

[GPUMemoryInMegaBytesCalc]
Measure=Calc
Formula=UsedVMEM + FreeVMEM

[GPU1MemoryUsage]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\FinalWire\AIDA64\SensorValues
RegValue=Value.SUSEDVMEM

[GPU1MemoryCalc]
Measure=Calc
Formula=GPU1MemoryUsage * 1

[GPU1MemoryCalc2]
Measure=Calc
Formula= GPU1MemoryUsage * 100 / GPUMemoryInMegaBytesCalc

[GPU1MemoryCalc3]
Measure=Calc
Formula=GPU1MemoryCalc2
MinValue=0
MaxValue=100
Percentual=1

[GPU1MemoryBarWarn]
Measure=Calc
Formula=GPU1MemoryCalc3> 90 ? -1 : -2
Substitute="-1":"255,0,0,200","-2":"#colorBar#"

[GPU1MemoryMBTextWarn]
Measure=Calc
Formula=GPU1MemoryCalc3< 30 ? -1 : (GPU1MemoryCalc3< 45 ? -2 : (GPU1MemoryCalc3< 60 ? -3 : (GPU1MemoryCalc3< 75 ? -4 : -5)))
Substitute="-1":"#colorText2#","-2":"255,200,153,100","-3":"255,175,102,100","-4":"255,150,51,150","-5":"255,0,0,150"

;__________________________________________________________FAN
[GPU1FanText2]
Meter=STRING
X=#textLeftAligned#
Y=#relativeDistanceLableBar#
Text="Fan"
FontColor=#colorText#
FontSize=#textSize#
StringAlign=LEFT
FontFace=#fontName#
AntiAlias=1

[GPU1FanRPMReading]
Meter=STRING
X=127
Y=r
MeasureName=GPU1FanRPM
Text="%1 RPM"
FontColor=#colorText2#
FontSize=#textSize#
StringAlign=CENTER
FontFace=#fontName#
AntiAlias=1

[GPU1FanRPM]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\FinalWire\AIDA64\SensorValues
RegValue=Value.FGPU1

[GPU1FanUsageReading]
Meter=STRING
X=#percentRightAligned#
Y=r
MeasureName=GPU1FanPercentCalc
Text="%1%"
FontColor=#colorText#
FontSize=#textSize#
StringAlign=RIGHT
NumofDecimals=0
FontFace=#fontName#
AntiAlias=1

[GPU1FanPercent]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\FinalWire\AIDA64\SensorValues
RegValue=Value.DGPU1

[GPU1FanPercentCalc]
Measure=Calc
Formula=GPU1FanPercent * 1

[GPU1FanPercentCalc2]
Measure=Calc
Formula=GPU1FanPercentCalc
MinValue=0
MaxValue=100
Percentage=1

[GPU1FanBar]
Meter=BAR
MeasureName=GPU1FanPercentCalc2
X=12
Y=#relativeDistanceBarLable#
W=#widthBar#
H=#hightBar#
BarColor=#colorBar#
SolidColor=#colorBarBackground#
BarOrientation=HORIZONTAL

;__________________________________________________________GPU CORE CLOCK & MEMORY CLOCK
[GPU1CoreMHZ]
Meter=STRING
MeasureName=GPU1CoreClock
X=10
Y=6r
FontColor=#colorText#
FontSize=#textSize#
StringAlign=LEFT
FontFace=#fontName#
AntiAlias=1
Text=CORE: %1 MHz

[GPU1MemMHZ]
Meter=STRING
Measurename=GPU1MemoryClock
X=#percentRightAligned#
Y=r
H=23
FontColor=#colorText#
FontSize=#textSize#
StringAlign=RIGHT
FontFace=#fontName#
AntiAlias=1
Text=MEMORY: %1 MHz

[GPU1MemoryClock]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\FinalWire\AIDA64\SensorValues
RegValue=Value.SGPU1MEMCLK

[GPU1CoreClock]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\FinalWire\AIDA64\SensorValues
RegValue=Value.SGPU1CLK

Re: DiskSpace Measure Problem

Posted: November 11th, 2018, 1:53 pm
by jsmorley
You are confusing [SectionVariables] with #Variables# I think.

The reason why your GPU skin works is in:

FontColor=[GPU1TempWarn]

So the FontColor of the String meter is set to the current string value of the Calc measure [GPU1TempWarn]. I'm not in love with this approach, but it will work if you do the same thing in your current skin.

Re: DiskSpace Measure Problem

Posted: November 11th, 2018, 2:04 pm
by Slim08
jsmorley wrote: November 11th, 2018, 1:53 pm You are confusing [SectionVariables] with #Variables# I think.

The reason why your GPU skin works is in:

FontColor=[GPU1TempWarn]

So the FontColor of the String meter is set to the current string value of the Calc measure [GPU1TempWarn]. I'm not in love with this approach, but it will work if you do the same thing in your current skin.
please look at my first post

Code: Select all

[styleCenterText]
StringAlign=CENTER
FontColor=#HD1TextWarn#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
it's already there and that would not explain why the bar doesn't change color unless there is an issue with the measurement both the bar and the text use. And that the code should work as seen in the GPU one so I figured it must have something to do with the [measureHD1GBCalc2] measurement or the two values used in its formula.

Edit: Now I see instead of the ## []

Re: DiskSpace Measure Problem

Posted: November 11th, 2018, 2:06 pm
by jsmorley
Slim08 wrote: November 11th, 2018, 2:04 pm please look at my first post

Code: Select all

[styleCenterText]
StringAlign=CENTER
FontColor=#HD1TextWarn#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
it's already there and that would not explain why the bar doesn't change color unless there is an issue with the measurement both the bar and the text use. And that the code should work as seen in the GPU one so I figured it must have something to do with the [measureHD1GBCalc2] measurement or the two values used in its formula.
But you are using FontColor=#HD1TextWarn#, and where is that variable HD1TextWarn, set in your skin?

Re: DiskSpace Measure Problem

Posted: November 11th, 2018, 2:08 pm
by jsmorley
As I said, you are confusing [SectionVariable] with #Variable#. They are not the same thing.