It is currently November 15th, 2018, 3:32 pm

IfCondition - [Solved]

Help with creating, editing & fixing problems with skins
User avatar
CyberTheWorm
Posts: 602
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

IfCondition - [Solved]

CyberTheWorm » November 21st, 2017, 6:07 am

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.
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
User avatar
ikarus1969
Posts: 287
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: IfCondition

ikarus1969 » November 21st, 2017, 6:19 am

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: 602
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: IfCondition

CyberTheWorm » November 21st, 2017, 6:32 am

ikarus1969 wrote:Hi!

The "IfCondition" works only on numerical values, not on strings (see documentation on "IfCondition")
Thanks, worked.
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
User avatar
ikarus1969
Posts: 287
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: IfCondition - [Solved]

ikarus1969 » November 21st, 2017, 6:55 am

Glad it works now!