It is currently May 10th, 2024, 10:39 am

[meterDelta] adding a leading "+" for positive Delta values

Get help with creating, editing & fixing problems with skins
emp00
Posts: 83
Joined: October 7th, 2022, 8:08 pm

[meterDelta] adding a leading "+" for positive Delta values

Post by emp00 »

Dear team,

I'm trying to modify below meter/measure: &MeasureDelta displays a number parsed from an URL api call. The number can be positive or negative, it's a delta e.g. "+3" or "-5" as an example. Negative values are always shown with "-" sign, that's good.

My problem: I want positive values to be shown with a leading "+", so the desired output for the positive example is "+3" instead of "3". The below code does not show a "+" and I cannot figure out how to simply append the "+" to the output. Thanks so much for your help!

Code: Select all

[MeasureDelta]
Measure=WebParser
URL=[MeasureSite]
StringIndex=6

[meterDelta]
Meter=String
X=50
Y=10
W=100
H=15
Text=[&MeasureDelta]
DynamicVariables=1
User avatar
balala
Rainmeter Sage
Posts: 16207
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [meterDelta] adding a leading "+" for positive Delta values

Post by balala »