It is currently September 29th, 2024, 5:32 pm

show graph max result

General topics related to Rainmeter.
steer123
Posts: 6
Joined: September 18th, 2013, 4:17 pm

show graph max result

Post by steer123 »

hi.. I dont know if im in the right section to post this but if not pls transfer this to the right section.

i just want to ask if there is a way dislay the max result of graph in rainmeter?

example is the MSIafterburner skin. i want to tweak it a little I want it to display the maximum GPu temperature of my laptop not just the monitoring of the current temperature..

thanks
User avatar
iNjUST
Posts: 117
Joined: June 20th, 2012, 12:44 am

Re: show graph max result

Post by iNjUST »

There might be other ways, but my idea is to have just two measures: One that measures the current GPU temperature every second (or whatever your Update value is), and another that checks the first measure's value against previous results to see if it's bigger (always reporting a maximum).

Code: Select all

[MeasureGPU]
Measure=...
; I'm assuming you already have this piece of the script
; ...

[MeasureMaxGPU]
Measure=Calc
Formula=MeasureGPU > MeasureMaxGPU ? MeasureGPU : MeasureMaxGPU
So this just says, if the new measurement is bigger than the old one, use the new one. If not, keep the old measurement. This means, once you load the skin, it will begin checking for the maximum during the time that the skin is loaded. The drawback is that if you refresh the skin, you reset the maximum.

If you want to circumvent this, we could make the [MeasureMaxGPU] a little bit different:

Code: Select all

[MeasureMaxGPU]
Measure=Calc
Formula=MeasureGPU > #MaxTemp# ? MeasureGPU : #MaxTemp#
OnChangeAction=[!SetVariable MaxTemp "[MeasureMaxGPU:]"][!WriteKeyValue Variables MaxTemp "[MeasureMaxGPU:]"]
DynamicVariables=1
Now, we store the Maximum temperature in a variable called MaxTemp, and check that instead. This also writes the variable to file, so if you refresh the skin, or unload it, it retains the MaxTemp data. If you want to reset it, you can either do it manually by typing MaxTemp=0 in the Variables, or add a custom Context Menu to the skin:

Code: Select all

[Rainmeter]
ContextTitle="Reset Max Temp"
ContextAction=[!WriteKeyValue Variables MaxTemp 0][!Refresh]
I haven't tested any of this, so I apologize if there's any errors or typos. I'm pretty sure this should work. Let me know if you have any questions, or if anyone else has better suggestions.
steer123
Posts: 6
Joined: September 18th, 2013, 4:17 pm

Re: show graph max result

Post by steer123 »

thanks for the quick reply.. i will try your code.. i just learned rainmeter last two day ago so im still a newbie and i want to learn more. anyway thank you I really learn alot from this.

EDIT:

Im trying to use this code

[MeasureGPU]
Measure=Plugin
Plugin=SpeedFanPlugin
SpeedFanType=Temperature
SpeedFanNumber=0
SpeedFanScale=C

but i cant seems to get it to work.. im still confuse on how to get the value of maxtemp.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: show graph max result

Post by fonpaolo »

You forgot the second part...

Code: Select all

[MeasureMaxGPUTemp]
Measure=Calc
Formula=(MeasureGPU>MeasureMaxGPUTemp)? MeasureGPU: MeasureMaxGPUTemp
As iNjUST said, you have to use that to obtain the max temperature.

I can assure you that this will work because I used this on a skin I have created (and still not distributed...)
Last edited by fonpaolo on September 19th, 2013, 7:18 pm, edited 1 time in total.
steer123
Posts: 6
Joined: September 18th, 2013, 4:17 pm

Re: show graph max result

Post by steer123 »

thank you so much for the help.. I finally figure it out.. thank you

Code: Select all

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

[MeasureGPU]
Measure=Plugin
Plugin=SpeedFanPlugin
SpeedFanType=Temperature
SpeedFanNumber=0
SpeedFanScale=C


[MeasureMaxGPU]
Measure=Calc
Formula=(MeasureGPU>MeasureMaxGPU)? MeasureGPU: MeasureMaxGPU
OnChangeAction=[!SetVariable MaxTemp "[MeasureMaxGPU:]"][!WriteKeyValue Variables MaxTemp 

"[MeasureMaxGPU:]"]
DynamicVariables=1


[MeterSpeedFan]
Meter=String
MeasureName=MeasureMaxGPU
FontSize=12
FontColor=255,255,255,255
StringStyle=Bold
AntiAlias=1
Text=GPU Temp: %1
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: show graph max result

Post by fonpaolo »

You're welcome. :D
I can assure you that usually the solution is in fron of you but you can't see it until someone points you in the right direction.

Happened to me many times... ;-)
steer123
Posts: 6
Joined: September 18th, 2013, 4:17 pm

Re: show graph max result

Post by steer123 »

yeah... specially im very much a beginner