It is currently March 28th, 2024, 4:34 pm

[Measure] Slimming down the Slideshow measures

Tips and Tricks from the Rainmeter Community
Post Reply
User avatar
GhostMatrix
Rainmeter Sage
Posts: 141
Joined: April 18th, 2009, 8:26 pm
Location: Montreal, Quebec, Canada 45.5658°N, 73.5898°W UTC -5

[Measure] Slimming down the Slideshow measures

Post by GhostMatrix »

You have sometime skins that are running a slideshow like the one for the weather datas in the default skin "Tranquil" for an example.
In a measure you can't have multiples of the same If______Action in it, but you can have different actions like IfEqualAction, IfAboveAction, and IfBelowAction.
In the code at the bottom of the post the 7 measures of the cycle have been Slimmed down to only 4 measures.
The benefit of using less measures is that you will use less system resources !

GM

The Tranquil skin default code for the cycle measure :

=================================================================================
; These measures cycle the information under the temperature. The idea here is
; that the Counter will increase by on one every update-cycle, so we'll just take
; a remainder of 70 from the value (there are 7 different items) so that we get
; values from 0 to 69. Then just hide all and show one of them every time the
; value grows larger than a certain number (the actions are executed only when
; the bypasses the value).

[MeasureCycle1]
Measure=Calc
Formula=Counter % 70
IfAboveValue=5
IfAboveAction=!execute #HideAll#[!RainmeterShowMeter MeterHumidity]

[MeasureCycle2]
Measure=Calc
Formula=Counter % 70
IfAboveValue=15
IfAboveAction=!execute #HideAll#[!RainmeterShowMeter MeterWindSpeed]

[MeasureCycle3]
Measure=Calc
Formula=Counter % 70
IfAboveValue=25
IfAboveAction=!execute #HideAll#[!RainmeterShowMeter MeterPressure]

[MeasureCycle4]
Measure=Calc
Formula=Counter % 70
IfAboveValue=35
IfAboveAction=!execute #HideAll#[!RainmeterShowMeter MeterDewPoint]

[MeasureCycle5]
Measure=Calc
Formula=Counter % 70
IfAboveValue=45
IfAboveAction=!execute #HideAll#[!RainmeterShowMeter MeterHeatIndex]

[MeasureCycle6]
Measure=Calc
Formula=Counter % 70
IfAboveValue=55
IfAboveAction=!execute #HideAll#[!RainmeterShowMeter MeterWindChill]

[MeasureCycle7]
Measure=Calc
Formula=Counter % 70
IfAboveValue=65
IfAboveAction=!execute #HideAll#[!RainmeterShowMeter MeterVisibility]

=====================================================================

The Tranquil skin enhanced code for the cycle measure :

Code: Select all

[MeasureCycle1]
Measure=Calc
Formula=Counter % 70
IfEqualValue=5
IfEqualAction=!execute #HideAll#[!RainmeterShowMeter MeterHumidity]
IfAboveValue=15
IfAboveAction=!execute #HideAll#[!RainmeterShowMeter MeterWindSpeed]

[MeasureCycle2]
Measure=Calc
Formula=Counter % 70
IfEqualValue=25
IfEqualAction=!execute #HideAll#[!RainmeterShowMeter MeterPressure]
IfAboveValue=35
IfAboveAction=!execute #HideAll#[!RainmeterShowMeter MeterDewPoint]

[MeasureCycle3]
Measure=Calc
Formula=Counter % 70
IfEqualValue=45
IfEqualAction=!execute #HideAll#[!RainmeterShowMeter MeterHeatIndex]
IfAboveValue=55
IfAboveAction=!execute #HideAll#[!RainmeterShowMeter MeterWindChill]

[MeasureCycle4]
Measure=Calc
Formula=Counter % 70
IfEqualValue=65
IfEqualAction=!execute #HideAll#[!RainmeterShowMeter MeterVisibility]
Post Reply