Page 1 of 1

IfCondition - [Solved]

Posted: November 21st, 2017, 6:07 am
by CyberTheWorm
Trying to get a meter based on an IfCondition. Sure I'm doing something stupid.

Code: Select all

[MeasureCoverSelect]
IfCondition=(#MediaPlayer# = Spotify)
IfTrueAction=[!SetOption MeterCover MeasureName MeasureSpotifyCover][!UpdateMeter "MeterCover"][!Redraw]
IfFalseAction=[!SetOption MeterCover MeasureName MeasureCover][!UpdateMeter "MeterCover"][!Redraw]
Trying to get the meter to change depending if I'm using Spotify or a different player since the Measure if different

Re: IfCondition

Posted: November 21st, 2017, 6:19 am
by ikarus1969
Hi!

The "IfCondition" works only on numerical values, not on strings (see documentation on "IfCondition")

What you would need is a "IfMatch"-Condition.

It depends on your code, could you please post the whole skin?

But maybe it works with a STRING-measure:

Code: Select all

[MeasureCoverSelect]
Measure=STRING
String=#MediaPlayer#
IfMatch=^Spotify$
IfMatchAction=[!SetOption MeterCover MeasureName MeasureSpotifyCover][!UpdateMeter "MeterCover"][!Redraw]
IfNotMatchAction=[!SetOption MeterCover MeasureName MeasureCover][!UpdateMeter "MeterCover"][!Redraw]
DynamicVariables=1

Re: IfCondition

Posted: November 21st, 2017, 6:32 am
by CyberTheWorm
ikarus1969 wrote:Hi!

The "IfCondition" works only on numerical values, not on strings (see documentation on "IfCondition")
Thanks, worked.

Re: IfCondition - [Solved]

Posted: November 21st, 2017, 6:55 am
by ikarus1969
Glad it works now!