It is currently April 19th, 2024, 9:49 am

[solved] Attempting to use Loop to cycle through roundline meters

Get help with creating, editing & fixing problems with skins
User avatar
CodeCode
Posts: 1365
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

[solved] Attempting to use Loop to cycle through roundline meters

Post by CodeCode »

Hello,
So I have some basic roundline meters, arranged concentrically. There are 4 in total. It sort of looks like a target.
However even though it is partially working, I am unsure why the concentric circles are skipping a value - or appears to. Either way I am unsure how to resolve this skipping issue:

*EDITED CODE: (using Loop Measure instead).

Code: Select all

[MeasureLoop]
Measure=Loop
StartValue=0
EndValue=3
Increment=1
LoopCount=0

[MeasurePingPong]
Measure=Calc
IfCondition=MeasureLoop = 3
IfTrueAction=[!SetOption MeasureLoop InvertMeasure 1][!UpdateMeasure MeasureCycle]
IfCondition2=MeasureLoop = 0
IfTrueAction2=[!SetOption MeasureLoop InvertMeasure 0][!UpdateMeasure MeasureCycle]

[MeasureCycle]
Measure=Calc
IfCondition=MeasureLoop = 0
IfTrueAction=[!SetOption Circle0 Hidden "0"][!SetOption Circle1 Hidden "1"][!SetOption Circle2 Hidden "1"][!SetOption Circle3 Hidden "1"][!UpdateMeasure MeasureCycle]
IfCondition2=MeasureLoop = 1
IfTrueAction2=[!SetOption Circle0 Hidden "1"][!SetOption Circle1 Hidden "0"][!SetOption Circle2 Hidden "1"][!SetOption Circle3 Hidden "1"][!UpdateMeasure MeasureCycle]
IfCondition3=MeasureLoop = 2
IfTrueAction3=[!SetOption Circle0 Hidden "1"][!SetOption Circle1 Hidden "1"][!SetOption Circle2 Hidden "0"][!SetOption Circle3 Hidden "1"][!UpdateMeasure MeasureCycle]
IfCondition4=MeasureLoop = 3
IfTrueAction4=[!SetOption Circle0 Hidden "1"][!SetOption Circle1 Hidden '1"][!SetOption Circle2 Hidden "1"][!SetOption Circle3 Hidden "0"][!UpdateMeasure MeasureCycle]
DynamicVariables=1

[Circle0]
Meter=Roundline
X=62
Y=62
W=307
H=307
LineLength=153
LineStart=113
LineColor=210,170,90
Solid=1
AntiAlias=1
Hidden=1
DynamicVariables=1

[Circle1]
Meter=Roundline
X=62
Y=62
W=307
H=307
LineLength=113
LineStart=73
LineColor=140,115,30
Solid=1
AntiAlias=1
Hidden=1
DynamicVariables=1

[Circle2]
Meter=Roundline
X=62
Y=62
W=307
H=307
LineLength=73
LineStart=33
LineColor=80,65,30
Solid=1
AntiAlias=1
Hidden=1
DynamicVariables=1

[Circle3]
Meter=Roundline
X=62
Y=62
W=307
H=307
LineLength=33
LineStart=0
LineColor=50,25,0
Solid=1
AntiAlias=1
Hidden=1
DynamicVariables=1
Any help is appreciated.
Last edited by CodeCode on September 3rd, 2021, 3:15 am, edited 1 time in total.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2603
Joined: March 23rd, 2015, 5:26 pm

Re: Attempting to use Loop to cycle through roundline meters

Post by SilverAzide »

I'm not sure of the appearance you are going for, but one issue that is causing the odd behavior of the rings is you have a really hard to see typo:

IfTrueAction4=...[!SetOption Circle1 Hidden '1"]...

On secondary note, you don't need any of those DynamicVariables=1 lines (since there are no variables), but maybe you were just experimenting or planning on adding some later. Also, you might be a little over-enthusiastic with the [!UpdateMeasure MeasureCycle] bangs, since they won't really have any effect on the skin, but perhaps again you were just testing. And finally, I don't think you need a dedicated ping-pong measure, since you can ping-pong the Loop just by itself.

Here is a stripped down version. I added a commented out debug line in the loop so you can see the cadence of what is happening. I was not sure if you intended certain increments to be repeated, i.e., the cadence goes 0,1,2,3,3,2,1,0,0,1,2,3,3.... (0 and 3 are repeated).

Code: Select all

[MeasureLoop]
Measure=Loop
StartValue=0
EndValue=3
Increment=1
LoopCount=0
IfCondition=MeasureLoop = 3
IfTrueAction=[!SetOption MeasureLoop InvertMeasure 1]
IfCondition2=MeasureLoop = 0
IfTrueAction2=[!SetOption MeasureLoop InvertMeasure 0]
;OnUpdateAction=[!Log "MeasureLoop = [MeasureLoop]" Notice]

[MeasureCycle]
Measure=Calc
IfCondition=MeasureLoop = 0
IfTrueAction=[!SetOption Circle0 Hidden "0"][!SetOption Circle1 Hidden "1"][!SetOption Circle2 Hidden "1"][!SetOption Circle3 Hidden "1"][!Redraw]
IfCondition2=MeasureLoop = 1
IfTrueAction2=[!SetOption Circle0 Hidden "1"][!SetOption Circle1 Hidden "0"][!SetOption Circle2 Hidden "1"][!SetOption Circle3 Hidden "1"][!Redraw]
IfCondition3=MeasureLoop = 2
IfTrueAction3=[!SetOption Circle0 Hidden "1"][!SetOption Circle1 Hidden "1"][!SetOption Circle2 Hidden "0"][!SetOption Circle3 Hidden "1"][!Redraw]
IfCondition4=MeasureLoop = 3
IfTrueAction4=[!SetOption Circle0 Hidden "1"][!SetOption Circle1 Hidden "1"][!SetOption Circle2 Hidden "1"][!SetOption Circle3 Hidden "0"][!Redraw]

[Circle0]
Meter=Roundline
X=62
Y=62
W=307
H=307
LineLength=153
LineStart=113
LineColor=210,170,90
Solid=1
AntiAlias=1
Hidden=1

[Circle1]
Meter=Roundline
X=62
Y=62
W=307
H=307
LineLength=113
LineStart=73
LineColor=140,115,30
Solid=1
AntiAlias=1
Hidden=1

[Circle2]
Meter=Roundline
X=62
Y=62
W=307
H=307
LineLength=73
LineStart=33
LineColor=80,65,30
Solid=1
AntiAlias=1
Hidden=1

[Circle3]
Meter=Roundline
X=62
Y=62
W=307
H=307
LineLength=33
LineStart=0
LineColor=50,25,0
Solid=1
AntiAlias=1
Hidden=1
Gadgets Wiki GitHub More Gadgets...
User avatar
CodeCode
Posts: 1365
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Attempting to use Loop to cycle through roundline meters

Post by CodeCode »

Wow. Thanks SilverAzide!

Such intrinsic differences but very subtle just the same.

It looks great. :thumbup:

Cheers.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.