It is currently April 18th, 2024, 11:45 am

Ram meter issues

Get help with creating, editing & fixing problems with skins
DC_PLAYER
Posts: 24
Joined: March 26th, 2011, 4:52 pm

Ram meter issues

Post by DC_PLAYER »

Hi everyone, i was here once before and i asked for help on how to convert a working cpu tachmeter into a gpu tachmeter, sadly due to the complexity of the gpu activity the meter was always loading 1 image as if the activity was always 0%, i essentially lost hope after some tries since the skin was a bit to complex and the issue could be anywhere.

For those wondering what a tachmeter is:
https://www.pcper.com/files/imagecache/article_max_width/review/2017-08-13/08.jpg

The concept is simple, you calculate a value of cpu, you then calculate what image needs to be loaded and then you display the correct image as a skin

For the CPU it's working fine, but today i wanted a RAM tachmeter, it's very similar to a bar but i won't want to load a bar, i wan't to load around 7 images as if each image is like a small light, so the concept for the cpu tachmeter is this:

Code: Select all

[Rainmeter]

Author=Kireek
Update=50



[mPercent]
Measure=CPU
Processor=1
Substitute=" ":""




[mIconCalc]
Measure=CALC
Formula=((100 >= mPercent) && (99 <= mPercent) ? 15 : ((98 > mPercent) && (92 <= mPercent) ? 14 : ((91 >= mPercent) && (85 <= mPercent) ? 13 : ((84 >= mPercent) && (78 <= mPercent) ? 12 : ((77 >= mPercent) && (71 <= mPercent) ? 11 : ((70 >= mPercent) && (64 <= mPercent) ? 10 : ((63 >= mPercent) && (57 <= mPercent) ? 9 : ((56 >= mPercent) && (50 <= mPercent) ? 8 : ((49 >= mPercent) && (43 <= mPercent) ? 7 : ((42 >= mPercent) && (36 <= mPercent) ? 6 : ((35 >= mPercent) && (29 <= mPercent) ? 5 : ((28 >= mPercent) && (22 <= mPercent) ? 4 : ((21 >= mPercent) && (15 <= mPercent) ? 3 : ((14 >= mPercent) && (8 <= mPercent) ? 2 : ((7 >= mPercent) && (1 <= mPercent) ? 1 : 0)))))))))))))))


[Icon]
Meter=IMAGE
MeasureName=mIconCalc
MeasureName2=mPercent
Path="#CURRENTPATH#"
ImageName=%1.png
X=0
Y=0
PreserveAspectRatio=1
AntiAlias=1
My question is, How do i make it read the ram? because when i replace "CPU" with "PhysicalMemory", the skin loads the 1st image, aka the 0.png
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Ram meter issues

Post by jsmorley »

Measure=PhysicalMemory is not a percentage, it is a number of bytes.

https://docs.rainmeter.net/manual/measures/memory/

To turn the amount of memory "used" into a percentage in order to drive an image name, as you want, you would need:

Code: Select all

[MeasurePhysMemUsed]
Measure=PhysicalMemory

[MeasurePhysMemUsed%]
Measure=Calc
Formula=Round(([MeasurePhysMemUsed:] / [MeasurePhysMemUsed:MaxValue]) * 100)
DynamicVariables=1
Then use the value of MeasurePhysMemUsed% in your Calc measure to evaluate the percentage as an integer from 0 - 100. Feel free to shorten the name, I just wanted to be clear what was what...
DC_PLAYER
Posts: 24
Joined: March 26th, 2011, 4:52 pm

Re: Ram meter issues

Post by DC_PLAYER »

That i didn't know.
But the issue remains, it always loads the 1st image, i was at 37% used memory (just 37 btw) and i was still using the image as if the usage was 0%

EDIT:
Nvm, it works. Tyvm
Last edited by DC_PLAYER on January 30th, 2018, 12:01 am, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Ram meter issues

Post by jsmorley »

Dunno. Works for me...

Code: Select all

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

[Variables]

[MeasurePhysMemUsed]
Measure=PhysicalMemory

[mPercent]
Measure=Calc
Formula=Round(([MeasurePhysMemUsed:] / [MeasurePhysMemUsed:MaxValue]) * 100)
DynamicVariables=1

[mIconCalc]
Measure=Calc
Formula=((100 >= mPercent) && (99 <= mPercent) ? 15 : ((98 > mPercent) && (92 <= mPercent) ? 14 : ((91 >= mPercent) && (85 <= mPercent) ? 13 : ((84 >= mPercent) && (78 <= mPercent) ? 12 : ((77 >= mPercent) && (71 <= mPercent) ? 11 : ((70 >= mPercent) && (64 <= mPercent) ? 10 : ((63 >= mPercent) && (57 <= mPercent) ? 9 : ((56 >= mPercent) && (50 <= mPercent) ? 8 : ((49 >= mPercent) && (43 <= mPercent) ? 7 : ((42 >= mPercent) && (36 <= mPercent) ? 6 : ((35 >= mPercent) && (29 <= mPercent) ? 5 : ((28 >= mPercent) && (22 <= mPercent) ? 4 : ((21 >= mPercent) && (15 <= mPercent) ? 3 : ((14 >= mPercent) && (8 <= mPercent) ? 2 : ((7 >= mPercent) && (1 <= mPercent) ? 1 : 0)))))))))))))))

[MeterPercent]
Meter=String
MeasureName=mIconCalc
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
1.png
You do not have the required permissions to view the files attached to this post.
DC_PLAYER
Posts: 24
Joined: March 26th, 2011, 4:52 pm

Re: Ram meter issues

Post by DC_PLAYER »

Yeah, got it to work now
Ty man, now i can make my own Ram Bar
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Ram meter issues

Post by jsmorley »

Great. Glad to help.