Just note one more: although the IfConditions are entirely numeric and you can't use them to compare strings, in a such case when the measure returns number, IfConditions also can be used. I don't say it would have any advantage in front of IfMatch, probably it doesn1t have, just to know the possibility, here is another solution to the same problem:
Code: Select all
[MeasureCurrent]
Measure=WebParser
Url=https://wxdata.weather.com/wxdata/weather/local/#Location#?cc=*&unit=#Unit#
RegExp=(?siU)<head>.*<ut>(.*)</ut>.*<dnam>(.*)</dnam>.*<tmp>(.*)</tmp>.*<t>(.*)</t>.*<hmid>(.*)</hmid>.*<icon>(.*)</icon>
UpdateRate=900
StringIndex=6
IfCondition=(#CURRENTSECTION#=0)
IfTrueAction=[!SetVariable FontColor "133,133,133"]
IfCondition2=(((#CURRENTSECTION#>=1)&&(#CURRENTSECTION#<=4))||(#CURRENTSECTION#=17)||(#CURRENTSECTION#=35))
IfTrueAction2=[!SetVariable FontColor "34,2,101"]
IfCondition3=(((#CURRENTSECTION#>=5)&&(#CURRENTSECTION#<=12))||(#CURRENTSECTION#=18))
IfTrueAction3=[!SetVariable FontColor "93,106,123"]
IfCondition4=(((#CURRENTSECTION#>=13)&&(#CURRENTSECTION#<=16))||(#CURRENTSECTION#=25)||(#CURRENTSECTION#=42)||(#CURRENTSECTION#=43))
IfTrueAction4=[!SetVariable FontColor "226,223,232"]
IfCondition5=((#CURRENTSECTION#>=19)&&(#CURRENTSECTION#<=24))
IfTrueAction5=[!SetVariable FontColor "151,147,159"]
IfCondition6=((#CURRENTSECTION#=26)||(#CURRENTSECTION#=44))
IfTrueAction6=[!SetVariable FontColor "58,146,255"]
IfCondition7=((#CURRENTSECTION#=28)||(#CURRENTSECTION#=29)||(#CURRENTSECTION#=33)||(#CURRENTSECTION#=45))
IfTrueAction7=[!SetVariable FontColor "44,102,174"]
IfCondition8=(#CURRENTSECTION#=31)
IfTrueAction8=[!SetVariable FontColor "3,55,98"]
IfCondition9=((#CURRENTSECTION#=30)||(#CURRENTSECTION#=32)||(#CURRENTSECTION#=34)||((#CURRENTSECTION#>=37)&&(#CURRENTSECTION#<=41)))
IfTrueAction9=[!SetVariable FontColor "241,154,16"]
No IfMatches in this case.
Again, probably this solution has no advantages in front of the solution with IfMatch, it's just another approach of the same problem.
Note that in the above (re)posted measure I:
EDIT: Fixed this code, after ikarus1969
found a mistake in the originally posted one. Thanks ikarus1969 and sorry for my mistake.