It is currently July 10th, 2020, 12:41 pm

[SOLVED] Making a meter that outputs '0' output '<1' instead

Get help with installing and using Rainmeter.
jn_meter
Posts: 33
Joined: December 27th, 2016, 12:04 pm

[SOLVED] Making a meter that outputs '0' output '<1' instead

Post by jn_meter »

I've this measure (which itself makes use of another measure):

Code: Select all

[measure_disk_used_percent_r]
Measure=CALC
Formula=Round(measure_disk_used_fraction_r * 100, 1)
That measure is used by this meter:

Code: Select all

[meter_value_r]
MeasureName=measure_disk_used_percent_r
Meter=String
Text=%1%
Sometimes the meter outputs, correctly, '0%'. I'd like that to say '<1%' instead. How, please?
Last edited by jn_meter on May 26th, 2020, 11:18 pm, edited 1 time in total.
User avatar
Jeff
Posts: 140
Joined: September 3rd, 2018, 11:18 am

Re: Making a meter that outputs '0' output '<1' instead

Post by Jeff »

Uhhhhhh, would adding

Code: Select all

RegExpSubstitute=1
Substitute="^0":"<1"
to the measure do the trick?
jn_meter
Posts: 33
Joined: December 27th, 2016, 12:04 pm

Re: Making a meter that outputs '0' output '<1' instead

Post by jn_meter »

It would! Marvellous! Thank you.