It is currently April 25th, 2024, 8:33 pm

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

Get help with installing and using Rainmeter.
jn_meter
Posts: 136
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: 332
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: 136
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.