Ok, I think I found a way using RegExpSubtitute:
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[Variables]
[MeasureString1]
Measure=String
String=String One
RegExpSubstitute=1
Substitute="^(?!\s*$)(.*)":"\1#CRLF#"
[MeasureString2]
Measure=String
String=""
RegExpSubstitute=1
Substitute="^(?!\s*$)(.*)":"\1#CRLF#"
[MeasureString3]
Measure=String
String=String Three
RegExpSubstitute=1
Substitute="^(?!\s*$)(.*)":"\1#CRLF#"
[MeasureString4]
Measure=String
String=""
RegExpSubstitute=1
Substitute="^(?!\s*$)(.*)":"\1#CRLF#"
[MeterOne]
Meter=String
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
DynamicVariables=1
Text=Hover me!
ToolTipText=[MeasureString1][MeasureString2][MeasureString3][MeasureString4]
1.png
So as noted in my earlier post, we are adding the #CRLF# to the string values when they are "used" in the meter, but only if they have at least one character in them that isn't just white space. Note that this does not in any way change the actual string value of the measure(s).
https://stackoverflow.com/questions/3085539/regular-expression-for-anything-but-an-empty-string
This is a moderately geeky regular expression. What it is saying is:
^(?!\s*$)(.*)
Start at the beginning of the string
^
Begin a look ahead directive
(?
if NOT
!
white space
\s
in any number of characters
*
till the end of the string
$
end directive
)
Capture all characters
(.*)
If there isn't at least one character that isn't white space, the match fails and the substitution is not done, so you don't get the #CRLF#.
You do not have the required permissions to view the files attached to this post.