IfCondition - [Solved]

Help with creating, editing & fixing problems with skins
User avatar

IfCondition - [Solved]

November 21st, 2017, 6:07 am
CyberTheWorm
   [466 posts]

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

Re: IfCondition

November 21st, 2017, 6:19 am
ikarus1969
   [239 posts]

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

Re: IfCondition

November 21st, 2017, 6:32 am
CyberTheWorm
   [466 posts]

ikarus1969 wrote:Hi!

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



Thanks, worked.
User avatar

Re: IfCondition - [Solved]

November 21st, 2017, 6:55 am
ikarus1969
   [239 posts]

Glad it works now!

Return to “Help: Rainmeter Skins”



Who is online

Users browsing this forum: No registered users and 6 guests