It is currently April 20th, 2024, 5:06 am

How to put "..." at the end of a string after clipping it's length?

Get help with creating, editing & fixing problems with skins
AqilCont
Posts: 6
Joined: August 19th, 2019, 12:44 am

How to put "..." at the end of a string after clipping it's length?

Post by AqilCont »

Image

I want to take off any characters that are exceeding the width of 200... and then put a "..." after the remaining characters. I know how to get the meter width and stuff, but do not know how to get the length and how to add a string to it(if this was any other language like JS, I could do it easily).

Code: Select all

[TopPlayTitle3]
Meter=String
Text=%1 [%2]
FontColor=255,255,255
FontSize=15
X=5
MeterStyle=TextStyle
MeasureName=m3PTitle
MeasureName2=m3PDiffName
Container=cTopPlay3
ClipString=1
LeftMouseUpAction=[m3PURL]
This is the code for it. Its in a container named cTopPlay3. I have almost no idea how to even get the length of the string and even less on how to shorten and add stuff to it. I am a beginner at creating Rainmeter skins and would love some help!
Last edited by AqilCont on August 24th, 2019, 7:45 pm, edited 1 time in total.
AqilCont
Posts: 6
Joined: August 19th, 2019, 12:44 am

Re: How to put "..." at the end of a string after clipping it's length?

Post by AqilCont »

Oh... I just figured out that ClipString exists... Sorry for the useless post
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5398
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: How to put "..." at the end of a string after clipping it's length?

Post by eclectic-tech »

AqilCont wrote: August 24th, 2019, 7:45 pm Oh... I just figured out that ClipString exists... Sorry for the useless post
No need to be sorry, we all started out knowing very little about Rainmeter! :great:
Glad you were able to find ClipString information...