From the example, the name of the processor is returned but with a space at the end, how can I make it return a value without a space in the end?
[MeasureRun]
Measure=Plugin
Plugin=RunCommand
Parameter=wmic cpu get Name
OutputType=ANSI
RegExpSubstitute=1
Substitute="Name.*#CRLF#":"","#CRLF#":""
ClipString=1
IfCondition=1
IfTrueAction=[!CommandMeasure MeasureRun "Run"]
[MeterResult]
Meter=String
MeasureName=MeasureRun
FontSize=14
FontColor=255,255,255,255
AntiAlias=1
Text=%1!
I think this can be done through regular expression, but I'm not strong at it.
Just add another Substitute in the substitution list to replace the occurence of one or more whitespaces from the end of the string (the pattern
"\s+$"
) with an empty string like below: