You would need to a FinishAction on the webparser to use a new measure with an IfMatch test, to see if a hyphen is in [MeasureRainmeter].
Code: Select all
[MeasureRainmeter]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1
Url="#URL#"
RegExp=(?siU)<title>(.*) - YouTube</title>
Substitute="[":"","]":"","lyric":"","(lyric)":"","(":"","Official":"","Music":""," Video":"",")":""
DecodeCharacterReference=3
StringIndex=1
DynamicVariables=1
FinishAction=[!UpdateMeasure Test4Hyphen]
[Test4Hyphen]
Measure=String
String=[MeasureRainmeter]
IfMatch=^.* - .*$
IfMatchAction=[!HideMeter MeterLastUpdate][!ShowMeter MeterLastUpdateHyphen]
IfNotMatchAction=[!ShowMeter MeterLastUpdate][!HideMeter MeterLastUpdateHyphen]
[MeasureLeft]
Measure=String
String=[MeasureRainmeter]
RegExpSubstitute=1
Substitute="^(.*) - .*$":"\1"
[MeasureRight]
Measure=String
String=[MeasureRainmeter]
RegExpSubstitute=1
Substitute="^.* - (.*)$":"\1"
Then if there is a hyphen, you have choices to either change the MeasureName(s) options in your title string meter to use the "Left" and "Right" regexpsubstitute values and change the Text value to show 2 measures...
Or hide the normal title meter and show a hyphen title meter in the same location; something like this:.
Code: Select all
[MeterLastUpdate]
Meter=STRING
MeasureName=MeasureRainmeter
X=110
Y=r
StringAlign=Center
StringEffect=none
StringStyle=Bold
StringCase=Upper
Padding=15,5,15,5
FontColor=255,255,255
FontSize=8
FontFace=Segoe UI
Antialias=1
Text=%1
hidden=1
DynamicVariables=1
[MeterLastUpdateHyphen]
Meter=STRING
MeasureName=MeasureLeft
MeasureName2=MeasureRight
X=110
Y=r
StringAlign=Center
StringEffect=none
StringStyle=Bold
StringCase=Upper
Padding=15,5,15,5
FontColor=255,255,255
FontSize=8
FontFace=Segoe UI
Antialias=1
Text=%1
hidden=1
DynamicVariables=1
You may need to modify this since you already have [MeterLastUpdate] hidden, and apparently show it by some other test. You didn't post the #URL#, so I can't fully test.