Dayzwell wrote: ↑March 28th, 2021, 2:43 amSo far i got the graph working whit my GPU usage data but instead of a number i get "total" on on mi text for some reason that i dont understand, so how do i get the number working the same as in the CPU one? I dont know that much about coding so this is a Copy+paste, if some one can help me i would thank you a lot.
How do i get to display the GPU usage number?
Here is the code that i am using and a picture of what i am getting
Code: Select all
[Rainmeter]
Update=1000
Author=Connect-R
BackgroundMode=2
SolidColor=0,0,0,1
DynamicWindowSize=1
AccurateText=1
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#+#ScrollMouseIncrement#)"][!Refresh]
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-#ScrollMouseIncrement# < 0.1 ? 0.1 : #Scale#-#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#-#ScrollMouseIncrement# < 0.1 ? 0.1 : #Scale#-#ScrollMouseIncrement#)"][!Refresh]
[Variables]
@include=#@#Variables.inc
Scale=0.22
;-------------------------------------------------------------
;-------------------------------------------------------------
[TopGPU]
Measure=Plugin
Plugin=UsageMonitor
Alias=GPU
Index=0
;-------------------------------------------------------------
;-------------------------------------------------------------
[MeterLine]
Meter=Line
MeasureName=TopGPU
LineColor=#FontColor2#
X=(0*#Scale#)
Y=(0*#Scale#)
W=(1050*#Scale#)
H=(300*#Scale#)
AutoScale=1
AntiAlias=1
[MeterLine2]
Meter=Line
MeasureName=TopGPU
LineColor=#FontColor#,50
X=(0*#Scale#)r
Y=(0*#Scale#)R
W=(1050*#Scale#)
H=(0*#Scale#)
Flip=1
AutoScale=1
AntiAlias=1
;-------------------------------------------------------------
;-------------------------------------------------------------
[MeterAverageGPU]
Meter=String
AntiAlias=1
DynamicVariables=1
MeasureName=TopGPU
StringAlign=Left
FontFace=Product Sans
FontColor=#FontColor#
FontSize=(50*#Scale#)
X=(0*#Scale#)
Y=(320*#Scale#)
Text="GPU:%1%"
AntiAlias=1
Percentual=1
AutoScale=1
You get the "Total" string shown up because
[MeterAverageGPU], being a string meter, automatically takes the
string (aka the "text") value of the
[TopGPU] measure, which, in the case of UsageMonitor measures, is different from its
number value (see the explanation
here).
In order to have the number value displayed you need to either create a Calc measure that takes the
TopGPU measure in its Formula option, or use the
TopGPU measure as a
section variable to get its numerical value in the associated meter. These things are explained in detail
here, but you should more or less do either:
Code: Select all
[TopGPU]
Measure=Plugin
Plugin=UsageMonitor
Alias=GPU
Index=0
[TopGPUNumber]
Measure=Calc
Formula=TopGPU
...
...
...
[MeterAverageGPU]
Meter=String
DynamicVariables=1
MeasureName=TopGPUNumber
StringAlign=Left
FontFace=Product Sans
FontColor=#FontColor#
FontSize=(50*#Scale#)
X=(0*#Scale#)
Y=(320*#Scale#)
Text="GPU:%1%"
AntiAlias=1
Percentual=1
AutoScale=1
or simply:
Code: Select all
[TopGPU]
Measure=Plugin
Plugin=UsageMonitor
Alias=GPU
Index=0
...
...
...
[MeterAverageGPU]
Meter=String
AntiAlias=1
DynamicVariables=1
MeasureName=[TopGPU]
StringAlign=Left
FontFace=Product Sans
FontColor=#FontColor#
FontSize=(50*#Scale#)
X=(0*#Scale#)
Y=(320*#Scale#)
Text="GPU:[TopGPU:/1024,0,%]%"
AntiAlias=1
The latter choice has some minor drawbacks that you can read in the last link I mentioned, so it's up to you which one you prefer. By the way, that link is a part of what
you linked yourself when talking about the UsageMonitor measures, so I guess you either missed reading about these things or just didn't know how to implement them because of what you mentioned about coding.