It is currently December 8th, 2021, 6:28 pm

Total RAM Measure/Two measures for one meter?

Help with creating, editing & fixing problems with skins
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Total RAM Measure/Two measures for one meter?

Post by JpsCrazy »

I've tried my very hardest to not post on here for awhile... but I've hit a brick wall.

I'm building off of another skin: http://customize.org/rainmeter/skins/70480
I'm trying to change the HP numbers into actual values, and I've pretty much figured it out. (I edited out the HP values that were already there)
The only thing is I don't know how to make Rainmeter detect the total space in a drive, and show the space used.
My example is for HD01.
I believe I need to incorporate the second code in place of the 55.7 for 'Text=%1/ 55.7' (%1 being space used; 55.7 being total space) but I have absolutely no idea how.
Help? [SOLVED]
Also, I have same problem for RAM. [Not solved]
[MeasureHD01]
Measure=FreeDiskSpace
InvertMeasure=1
Drive=C:\

[MeterText]
Meter=String
MeasureName=MeasureCalc
FontFace=Pokemon R/S
FontSize=16
StringStyle=Bold
StringAlign=Right
Antialias=0
Text=%1/ 55.7
x=330
y=15
w=50
h=20
NumOfDecimals=1

[MeasureCalc]
Measure=Calc
Formula=MeasureHD01/1073741824
[MeasureTotal]
Measure=FreeDiskSpace
Drive=C:
IgnoreRemovable=0
Total=1
Total RAM (Inaccurate)
[MeasureRAM]
Measure=PhysicalMemory

[MeasureInvRAM]
Measure=PhysicalMemory
InvertMeasure=1

[MeterText]
Meter=String
MeasureName=MeasureCalc
MeasureName2=MeasureCalc2
FontFace=Pokemon R/S
FontSize=16
StringStyle=Bold
StringAlign=Right
Antialias=0
Text=%1/ %2
x=330
y=15
w=50
h=20

[MeasureCalc]
Measure=Calc
Formula=MeasureRAM/1073742

[MeasureCalc2]
Measure=Calc
Formula=(MeasureInvRAM+MeasureRAM)/1073742
Last edited by JpsCrazy on April 23rd, 2010, 4:07 am, edited 2 times in total.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Two measures for one meter?

Post by smurfier »

I believe you have it correct for measuring the total size of the drive. To insert another measure into the string, just put in another measurename field (ie. MeasureName2=) going in sequential order, then place the cooresponding number in the text field (%2).

Example:

Code: Select all

[mtString]
Meter=String
MeasureName=Measure1
MeasureName2=Measure2
MeasureName3=Measure3
Text="%1 %2 %3"
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Two measures for one meter?

Post by smurfier »

For ram, try measure both free space and allocated space and adding them together using a calc measure to get the total space available. I don't know how accurate this would be as I'm guessing the original measures would round up and down.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: Two measures for one meter?

Post by JpsCrazy »

...well that was outrageously simple.
I did another Calc to get a Gb value instead of bytes, but it worked as simply as stated.
Thanks! :D

And for the RAM, I got it, but it's slightly inaccurate. It's constantly at 990Mb, but I know I have 1Gb of RAM. (990 would be weird to see... It should be 1024.)
Improvements? I think adding 34 to the calc value will work for me, but not another person.
[MeasureRAM]
Measure=PhysicalMemory

[MeasureInvRAM]
Measure=PhysicalMemory
InvertMeasure=1

[MeterText]
Meter=String
MeasureName=MeasureCalc
MeasureName2=MeasureCalc2
FontFace=Pokemon R/S
FontSize=16
StringStyle=Bold
StringAlign=Right
Antialias=0
Text=%1/ %2
x=330
y=15
w=50
h=20

[MeasureCalc]
Measure=Calc
Formula=MeasureRAM/1073742

[MeasureCalc2]
Measure=Calc
Formula=(MeasureInvRAM+MeasureRAM)/1073742
User avatar
Alex2539
Rainmeter Sage
Posts: 642
Joined: July 19th, 2009, 5:59 am
Location: Montreal, QC, Canada

Re: Total RAM Measure/Two measures for one meter?

Post by Alex2539 »

Where on Earth did 1073742 come from? I'm guessing that you're trying to show the amount of RAM in MB, correct? If that's the case then the number you should be dividing by is 1024*1024 = 1048576. If I had to guess I'd say that you accidentally multiplied something by 1.024, which would give that number if you rounded.
ImageImageImageImage
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: Total RAM Measure/Two measures for one meter?

Post by JpsCrazy »

You have a very good point.
It's late. And I'm not thinking very well.
Earliar, I just remembered 1Kb=1024bytes. Not 1000.
So what did I do to get Mb? Took three digits off of Gb of course. Thought I woulda learned something, right?
Thanksss.

Still missing 10mb of RAM though...
Sunspot2
Posts: 46
Joined: January 29th, 2010, 3:39 pm

Re: Total RAM Measure/Two measures for one meter?

Post by Sunspot2 »

I dont understand.
You want to show the data like this? In Gb?
You do not have the required permissions to view the files attached to this post.
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: Total RAM Measure/Two measures for one meter?

Post by JpsCrazy »

Originally, yes. But I figured all that out with the help of these two above.

The problem now is the Total RAM is calculating out to 1014Mb
It should be 1024Mb, I believe.

The code:
[MeasureRAM]
Measure=PhysicalMemory

[MeasureInvRAM]
Measure=PhysicalMemory
InvertMeasure=1

[MeterText]
Meter=String
MeasureName=MeasureCalc
MeasureName2=MeasureCalc2
FontFace=Pokemon R/S
FontSize=16
StringStyle=Bold
StringAlign=Right
Antialias=0
Text=%1/ %2
x=330
y=15
w=50
h=20

[MeasureCalc]
Measure=Calc
Formula=MeasureRAM/1048576

[MeasureCalc2]
Measure=Calc
Formula=(MeasureInvRAM+MeasureRAM)/1048576
Sunspot2
Posts: 46
Joined: January 29th, 2010, 3:39 pm

Re: Total RAM Measure/Two measures for one meter?

Post by Sunspot2 »

That's because you're using a formula to show total ram (Total = Free + Used). As used and free are aproximate to some decimal, this total differ from your real ram total. In my image you can see that if you add free and used, the result will be 1.99 Gb, not 2.0 Gb
To display the real total, use:


Measure=PhysicalMemory
Total=1

Instead of a formula.
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: Total RAM Measure/Two measures for one meter?

Post by JpsCrazy »

I always have to make things overly complicated.
Well. I did that. Still got 1014.