It is currently December 14th, 2018, 8:24 pm

Shortening large numbers

General topics related to Rainmeter.
BobbyBoy
Posts: 8
Joined: June 21st, 2018, 5:09 am

Shortening large numbers

BobbyBoy » November 6th, 2018, 8:43 am

Hello!

Looking for some options on shortening large numbers, really wish I'd of been more into math in high school all the sudden :(
For example if [Measure24hVolume] returned 11,667,830 I'd like to display 11.6M for readability and space purposes, anyone have any slick ideas?

Thanks for the input in advance!
User avatar
ikarus1969
Posts: 303
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: Shortening large numbers

ikarus1969 » November 6th, 2018, 10:03 am

The key to your request are 2 options to the String-meter: AutoScale and NumOfDecimals:

AutoScale=2 means scale by 1000 (and not 1024)
NumOfDecimals=1 means display 1 decimal

Docu AutoScale: https://docs.rainmeter.net/manual-beta/meters/string/#AutoScale
Docu NumOfDecimals: https://docs.rainmeter.net/manual-beta/meters/string/#NumOfDecimals

Screenshot Rainmeter Scaling.jpg

Code: Select all

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

[Variables]

[Measure_LargeNumber]
Measure=CALC
Formula=11667830

[Meter_LargeNumber]
Meter=STRING
MeasureName=Measure_LargeNumber
AutoScale=2
NumberOfDecimals=1
FontSize=24
FontColor=255,255,255
SolidColor=47,47,47,255
Padding=10,10,10,10
AntiAlias=1
DynamicVariables=1
You do not have the required permissions to view the files attached to this post.
BobbyBoy
Posts: 8
Joined: June 21st, 2018, 5:09 am

Re: Shortening large numbers

BobbyBoy » November 6th, 2018, 7:36 pm

After posting I reread the autoscale stuff but your example helped, thank you!