andrewisbest69 wrote: ↑November 4th, 2019, 4:23 pm
Sent the code. Can u help me now?
Yes, I suppose I can. Here is it:
Add the UpdateStations variable into the [Variables] section:
This will be the update period of changing the texts (supposing the Update value within the [Rainmeter] section is set to the default
Update=1000) of the [MeterStations] meter (which will return either
Wien hbf - via Hanau hbf.,
Wien hbf - via Regensburg hbf.,
Wien hbf - via Plattling or
Wien hbf - via Linz hbf.). If needed, you can use any value.
Add the following two measures to your code:
Code: Select all
[MeasureStations]
Measure=Calc
Formula=(( #CURRENTSECTION# + 1 ) % 4 )
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!SetOption MeterStations Text "Wien hbf - via Hanau hbf."][!UpdateMeter "MeterStations"][!Redraw]
IfCondition2=(#CURRENTSECTION#=1)
IfTrueAction2=[!SetOption MeterStations Text "Wien hbf - via Regensburg hbf."][!UpdateMeter "MeterStations"][!Redraw]
IfCondition3=(#CURRENTSECTION#=2)
IfTrueAction3=[!SetOption MeterStations Text "Wien hbf - via Plattling"][!UpdateMeter "MeterStations"][!Redraw]
IfCondition4=(#CURRENTSECTION#=3)
IfTrueAction4=[!SetOption MeterStations Text "Wien hbf - via Linz hbf."][!UpdateMeter "MeterStations"][!Redraw]
UpdateDivider=#UpdateStations#
[MeasureBlinking]
Measure=Calc
formula=( COUNTER % 2 )
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!HideMeter "MeterDeparture"][!Redraw]
IfFalseAction=[!ShowMeter "MeterDeparture"][!Redraw]
Paused=1
The first of these two measures ([MeasureStations]) is setting the station name, while the second one ([MeasureBlinking]) is blinking the [MeterDeparture] meter.
Since the Text option of the [MeterStations] meter is set through the !SetOption bangs of the [MeasureStations] measure, you can get rid of Text option of the [MeterStations] meter (remove it).
See that the [MeasureBlinking] measure is paused at the beginning (due to its
Paused=1 option), so the [MeterDeparture] meter doesn't blink. If you add a
LeftMouseUpAction=[!TogglePauseMeasure "MeasureBlinking"] option to the [MeterDeparture] meter, you can start blinking it through a click onto it (then on every following click it will stop / start blinking again).
Is this what you wanted?