It is currently April 24th, 2024, 1:15 pm

ClipString- hide ellipsis ...

Get help with creating, editing & fixing problems with skins
User avatar
xenium
Posts: 866
Joined: January 4th, 2018, 9:52 pm

ClipString- hide ellipsis ...

Post by xenium »

Hi,
is there any solution, to eliminate this ellipse from the picture below?
I think it is from the option clipstring = 1
ClipString Ellipsis.PNG
this is the code:

Code: Select all

[Rainmeter]
Author=xenium


[Variables]
UpdateRateSeconds=100
FontFace=Calibri
URL=https://www.foreca.com/Italy/Rome?tenday
URL1=https://www.foreca.com/Italy/Rome


 
[MeasureName]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#URL#
RegExp="(?siU)<h1>(.*)</h1>.*"
UpdateRate=#UpdateRateSeconds#
Substitute="&deg;":""
StringIndex=1


[MeasureCondition]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#URL1#
RegExp="(?siU)<div class="right txt-tight">(.*)<br />.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1



[MeterName]
Meter=String
MeasureName=MeasureName
X=288
Y=10
W=290
H=50
FontColor=250,250,250,250
StringStyle=normal
StringEffect=shadow
FontFace=calibri
StringAlign=Left
FontEffectColor=0,0,0,80
AntiAlias=1
ClipString=1
FontSize=25


[MeterCondition]
Meter=String
MeasureName=MeasureCondition
X=240
Y=20r
W=355
H=150
FontColor=250,250,250,250
StringStyle=normal
StringEffect=shadow
FontFace=calibri
StringAlign=CENTER 
FontEffectColor=0,0,0,80
AntiAlias=1
ClipString=1
FontSize=17
AntiAlias=1
Thanks
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ClipString- hide ellipsis ...

Post by jsmorley »

The problem is that your regular expression is returning a bunch of tabs and linefeeds at the beginning and end of of the string returned for "conditions".

Code: Select all


				  	Cloudy
				  	
You can figure out and fix the regular expression to avoid the tabs and linefeeds, or just strip them off:

Code: Select all

[MeasureCondition]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#URL1#
RegExp="(?siU)<div class="right txt-tight">(.*)<br />.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1
RegExpSubstitute=1
Substitute="\t":"","#CRLF#":""
User avatar
xenium
Posts: 866
Joined: January 4th, 2018, 9:52 pm

Re: ClipString- hide ellipsis ...

Post by xenium »

jsmorley wrote:The problem is that your regular expression is returning a bunch of tabs and linefeeds at the beginning and end of of the string returned for "conditions".

Code: Select all


				  	Cloudy
				  	
You can figure out and fix the regular expression to avoid the tabs and linefeeds, or just strip them off:

Code: Select all

[MeasureCondition]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#URL1#
RegExp="(?siU)<div class="right txt-tight">(.*)<br />.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1
RegExpSubstitute=1
Substitute="\t":"","#CRLF#":""
:17good
Thank you very much !
:welcome:
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ClipString- hide ellipsis ...

Post by jsmorley »

You're welcome!
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ClipString- hide ellipsis ...

Post by jsmorley »

P.S. This should really be:

Code: Select all

[MeasureCondition]
Measure=WebParser
Url=#URL1#
RegExp="(?siU)<div class="right txt-tight">(.*)<br />.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1
RegExpSubstitute=1
Substitute="\t":"","#CRLF#":""
https://docs.rainmeter.net/manual/measures/webparser/#NotAPlugin
User avatar
xenium
Posts: 866
Joined: January 4th, 2018, 9:52 pm

Re: ClipString- hide ellipsis ...

Post by xenium »

jsmorley wrote:P.S. This should really be:

Code: Select all

[MeasureCondition]
Measure=WebParser
Url=#URL1#
RegExp="(?siU)<div class="right txt-tight">(.*)<br />.*"
UpdateRate=#UpdateRateSeconds#
StringIndex=1
RegExpSubstitute=1
Substitute="\t":"","#CRLF#":""
https://docs.rainmeter.net/manual/measures/webparser/#NotAPlugin
ok :thumbup:
Thanks