Code: Select all
[MeasureNegativeTimer]
Measure=Calc
Formula=( MeasurePosition - MeasureDuration )
Code: Select all
[MeasureNegativeTimer]
Measure=Calc
Formula=( MeasurePosition - MeasureDuration )
You have to convert the number of seconds into minutes and seconds. For this, the first step will be to calculate not the difference between the position and duration, but vice-versa: between duration and position. This will be a positive number and you'll be able to work less complicated with it.
Code: Select all
[MeasureNegativeTimerMinutes]
Measure=Calc
Formula=( Floor (( MeasureDuration - MeasurePosition ) / 60 ))
RegExpSubstitute=1
Substitute="^(.)$":"0\1"
[MeasureNegativeTimerSeconds]
Measure=Calc
Formula=(( MeasureDuration - MeasurePosition ) - 60 * MeasureNegativeTimerMinutes )
RegExpSubstitute=1
Substitute="^(.)$":"0\1"
Code: Select all
[MeterTime]
Meter=STRING
MeasureName=MeasureNegativeTimerMinutes
MeasureName2=MeasureNegativeTimerSeconds
...
Text=-%1:%2
No, there is no such a way. But you can operate with negative numbers, too. But anyway you have to make those calculations.Slim08 wrote: ↑November 3rd, 2018, 5:24 pm I get how your workaround works but is there really no other way to convert the measurement from negative seconds to negative minutes and seconds? I mean rainmeter is already calculating correctly in some sense with my simple formula - I just thought there would be a way to add something like autoscale to brake down the measurement in the next higher unit.
Code: Select all
[MeasureNegativeTimer]
Measure=Calc
Formula=( MeasurePosition - MeasureDuration )
[MeasureNegativeTimerMinute]
Measure=Calc
Formula=( Ceil ( MeasureNegativeTimer / 60 ))
RegExpSubstitute=1
Substitute="(\d{1})$":"0\1"
[MeasureNegativeTimerSecond]
Measure=Calc
Formula=( Abs (( 60 * MeasureNegativeTimerMinute + 1 + MeasureNegativeTimer ) % 60 ))
RegExpSubstitute=1
Substitute="^(\d{1})$":"0\1"
I'm glad if you got it working and also thanks for the kind words.