Loop measure
Measure=Loop
Creates a looping counter between two values.
The measure will be the value of StartValue
for one update, will increment based on the value of Increment
on each subsequent update, and will be the value of EndValue
for one update. If LoopCount
is other than 1
, the loop will then repeat.
On each loop, if the value of Increment
is such that the final increment would cause the value to overrun the value of EndValue
, the final increment will be reduced to the remainder required to have the loop end at EndValue
.
The measure will have a range that is the difference between StartValue
and EndValue
for use by meters requiring a percentage. There cannot be a negative percentage, so the range will always be lowest value to highest value.
Any dynamic change to any of the four measure options, or dynamically changing InvertMeasure on the measure, will cause the loop to be reset and start over with the new values.
Note: All options must be positive or negative whole numbers, or formulas that resolve to whole numbers. Fractional values will be truncated.
Options
- General measure options
-
All general measure options except
AverageSize
are valid.MinValue
andMaxValue
are automatically set based onStartValue
andEndValue
, and may not be manually set or changed. StartValue
Default:1
-
The starting value for the loop. This may be any positive or negative whole number.
EndValue
Default:100
-
The ending value for the loop. This may be any positive or negative whole number.
Increment
Default:1
-
A positive or negative whole number by which the counter will be incremented on each update.
LoopCount
Default:0
-
The number of times the loop will be executed. The default of
0
will endlessly repeat. When LoopCount is reached, the measure will stop at and maintain the value of theEndValue
option.
Measure Commands
Commands that can be sent to a Loop measure using the !CommandMeasure bang.
Reset
-
This will cause the measure to reset the loop and restart using the current values for all options.
Example:
[!CommandMeasure MeasureName "Reset"]
Note: Any dynamic change to any of the four measure options, or dynamically changing InvertMeasure on the measure, will automatically perform a reset of the loop. This command would not be required.
Examples
[Rainmeter] |
If InvertMeasure is set to 1
, the opposite of the value generated by the loop will be returned. This can have the effect of reversing the direction of the loop. Toggling InvertMeasure
with !SetOption can create a "ping-pong" effect with the measure.
[Rainmeter] |