It is currently March 28th, 2024, 1:30 pm

IfCondition - [Solved]

Get help with creating, editing & fixing problems with skins
Post Reply
User avatar
CyberTheWorm
Posts: 860
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

IfCondition - [Solved]

Post 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
Last edited by CyberTheWorm on November 21st, 2017, 6:31 am, edited 1 time in total.
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: IfCondition

Post 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
User avatar
CyberTheWorm
Posts: 860
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: IfCondition

Post by CyberTheWorm »

ikarus1969 wrote:Hi!

The "IfCondition" works only on numerical values, not on strings (see documentation on "IfCondition")
Thanks, worked.
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: IfCondition - [Solved]

Post by ikarus1969 »

Glad it works now!
Post Reply