I have recently started to create my own suite from various suites/skins and now I have a problem with my music player, if the name of the song or the artist is too long again the rest is simply cut off. I had already looked on the Internet and in the forum for solutions but I have only found the following code in the forum.
Code: Select all
[Rainmeter]
MiddleMouseUpAction=[!Refresh]
OnRefreshAction=[!CommandMeasure MeasureActionTimer "Execute 1"][!CommandMeasure MeasureActionTimer "Execute 2"][!CommandMeasure MeasureActionTimer "Execute 3"]
AccurateText=1
[Variables]
; Text settings
text1=This is a long text testy
text2=This is an even loooooooooonger text testy
text3=Too short testy!
; Marquee settings
animationSpeed=32
marqueeBeginWait=1500
marqueeEndWait=1500
; Dynamic variables - do not change
marquee1=0
marquee2=0
marquee3=0
[StyleText]
FontFace=Calibri
FontColor=230,230,230
FontSize=15
FontWeight=600
X=0
Y=1R
Antialias=1
Container=MeterTextContainer
DynamicVariables=1
[MeasureMarquee1Offset]
Measure=Calc
Formula=max(0,([MeterText1:W] - [MeterTextContainer:W]))
DynamicVariables=1
[MeasureMarquee2Offset]
Measure=Calc
Formula=max(0,([MeterText2:W] - [MeterTextContainer:W]))
DynamicVariables=1
[MeasureMarquee3Offset]
Measure=Calc
Formula=max(0,([MeterText3:W] - [MeterTextContainer:W]))
DynamicVariables=1
[MeasureActionTimer]
Measure=Plugin
Plugin=ActionTimer
; Marquee 1
ActionList1=Repeat Move1,#animationSpeed#,[MeasureMarquee1Offset:] | Wait #marqueeEndWait# | Reset1 | Wait #marqueeBeginWait# | DoOver1
Reset1=[!SetVariable marquee1 0][!UpdateMeasure MeasureActionTimer][!UpdateMeter MeterText1][!Redraw]
Move1=[!SetVariable marquee1 "(#marquee1# - 1)"][!UpdateMeasure MeasureActionTimer][!UpdateMeter MeterText1][!Redraw]
DoOver1=[!CommandMeasure MeasureActionTimer "Execute 1"]
; Marquee 2
ActionList2=Repeat Move2,#animationSpeed#,[MeasureMarquee2Offset:] | Wait #marqueeEndWait# | Reset2 | Wait #marqueeBeginWait# | DoOver2
Reset2=[!SetVariable marquee2 0][!UpdateMeasure MeasureActionTimer][!UpdateMeter MeterText2][!Redraw]
Move2=[!SetVariable marquee2 "(#marquee2# - 1)"][!UpdateMeasure MeasureActionTimer][!UpdateMeter MeterText2][!Redraw]
DoOver2=[!CommandMeasure MeasureActionTimer "Execute 2"]
; Marquee 3
ActionList3=Repeat Move3,#animationSpeed#,[MeasureMarquee3Offset:] | Wait #marqueeEndWait# | Reset3 | Wait #marqueeBeginWait# | DoOver3
Reset3=[!SetVariable marquee3 0][!UpdateMeasure MeasureActionTimer][!UpdateMeter MeterText3][!Redraw]
Move3=[!SetVariable marquee3 "(#marquee3# - 1)"][!UpdateMeasure MeasureActionTimer][!UpdateMeter MeterText3][!Redraw]
DoOver3=[!CommandMeasure MeasureActionTimer "Execute 3"]
DynamicVariables=1
[MeterBackground]
Meter=Shape
Shape=Rectangle 1,1,180,106,6 | StrokeWidth 2 | Stroke Color 50,50,50 | Fill Color 15,15,15
[MeterTextContainer]
Meter=Image
SolidColor=255,255,255,255
X=16
Y=16
W=150
H=76
[MeterText1]
Meter=String
MeterStyle=StyleText
X=#marquee1#
Y=1
Text=#text1#
[MeterText2]
Meter=String
MeterStyle=StyleText
X=#marquee2#
Text=#text2#
[MeterText3]
Meter=String
MeterStyle=StyleText
X=#marquee3#
Text=#text3#
The code of the music player looks like this.
Code: Select all
[Rainmeter]
Update=200
DynamicWindowSize=1
AccurateText=1
MouseScrollUpAction=[!SetVariable Scale "(#Scale#+#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#+#ScrollMouseIncrement#)"][!Refresh]
MouseScrollDownAction=[!SetVariable Scale "(#Scale#-#ScrollMouseIncrement# < 1 ? 1 : #Scale#-#ScrollMouseIncrement#)"][!WriteKeyValue Variables Scale "(#Scale#-#ScrollMouseIncrement# < 1 ? 1 : #Scale#-#ScrollMouseIncrement#)"][!Refresh]
MouseActionCursorName=Hand
[Variables]
ScrollMouseIncrement=0.1
Player=Spotify
Scale=3.1
DarkBlue=27,63,107,255
MediumBlue=92,135,209,255
AlmostBlack=40,40,40,255
AlmostWhite=211,40,56
;-------------------------------------------------------------
[MeasureAlbumArt]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=COVER
[MeterAlbumArt]
Meter=Image
MeasureName=MeasureAlbumArt
Meter=String
MeasureName=MeasureTitle
StringAlign=Left
FontFace=b Bath Towel
FontColor=211,40,56
FontSize=(8*#Scale#)
X=(0*#Scale#)
Y=(0*#Scale#)
W=(100*#Scale#)
Text="%1"
ClipString=1
AntiAlias=1
MaskImageName=#@#Images\Mask.png
;-------------------------------------------------------------
[MeasureTitle]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=TITLE
Substitue="":""
[MeterTitle]
Meter=String
MeasureName=MeasureTitle
StringAlign=Left
FontFace=b Bath Towel
FontColor=211,40,56
FontSize=(8*#Scale#)
X=(100*#Scale#)
Y=(5*#Scale#)
W=(130*#Scale#)
Text="%1"
ClipString=1
AntiAlias=1
;-------------------------------------------------------------
[MeasureArtist]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=ARTIST
Substitue="":""
[MeterArtist]
Meter=String
MeasureName=MeasureArtist
StringAlign=Left
StringCase=Upper
FontFace=b Bath Towel
FontColor=211,40,56
FontSize=(7*#Scale#)
X=(100*#Scale#)
Y=(18*#Scale#)
W=(130*#Scale#)
Text="%1"
ClipString=1
AntiAlias=1
;-------------------------------------------------------------
[MeasureAlbum]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=ALBUM
Substitue="":""
[MeterAlbum]
Meter=String
MeterStyle=SpotifyStyleAlbum
MeasureName=MeasureAlbum
StringAlign=Left
FontFace=b Bath Towel
FontColor=211,40,56
FontSize=(6*#Scale#)
X=(100*#Scale#)
Y=(30*#Scale#)
W=(130*#Scale#)
Text="%1"
ClipString=1
AntiAlias=1
;-------------------------------------------------------------
[MeasureProgress]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=PROGRESS
;-------------------------------------------------------------
[MeasureDuration]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=DURATION
[MeterDuration]
Meter=String
MeasureName=MeasureDuration
StringAlign=Center
FontFace=b Bath Towel
FontColor=211,40,56
FontSize=(5*#Scale#)
X=(107*#Scale#)
Y=(45*#Scale#)
Text="%1"
AntiAlias=1
[MeterDuration2]
Meter=String
MeasureName=MeasureMinutesRemaining
MeasureName2=MeasureSecondsRemaining
StringAlign=Center
FontFace=b Bath Towel
FontColor=211,40,56
FontSize=(5*#Scale#)
X=(221*#Scale#)
Y=(45*#Scale#)
Text="%1:%2"
AntiAlias=1
;-------------------------------------------------------------
[MeasurePosition]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Position
UpdateDivider = 5
Substitute="":"N/A"
;-------------------------------------------------------------
[MeasureStateButton]
Measure=Plugin
Plugin=WebNowPlaying
PlayerName=#Player#
PlayerType=STATE
Substitute="0":"#@#Images\Play.png","1":"#@#Images\Pause.png","2":"#@#Images\Play.png"
[MeasureMinutesRemaining]
Measure=Calc
Formula=Trunc((MeasureDuration - MeasurePosition)/60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"
[MeasureSecondsRemaining]
Measure=Calc
Formula=((MeasureDuration - MeasurePosition) % 60)
RegExpSubstitute=1
Substitute="^(.)$":"0\1"
[MeasureRating]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Rating
[MeasureHeartRaw]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Rating
IfCondition=MeasureHeartRaw = 0
IfTrueAction=[!SetOption MeterHeart ImageTint "#MediumBlue#"]
IfCondition2=MeasureHeartRaw = 5
IfTrueAction2=[!SetOption MeterHeart ImageTint "#AlmostWhite#"]
;-------------------------------------------------------------
[MeasureHeart]
Measure=Calc
Formula=(MeasureHeartRaw=5 ? 0 : 5)
[MeterHeart]
Meter=Image
ImageName=#@#images\heart.png
ImageTint=#AlmostWhite#
X=(135*#Scale#)
Y=(65*#Scale#)
W=(17*#Scale#)
H=(17*#Scale#)
LeftMouseUpAction=[!CommandMeasure MeasureHeartRaw "SetRating [&MeasureHeart]"]
AntiAlias=1
;-------------------------------------------------------------
[MeasureShuffle]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Shuffle
IfCondition=MeasureShuffle = 0
IfTrueAction=[!SetOption MeterShuffle ImageTint "#MediumBlue#"]
IfCondition2=MeasureShuffle = 1
IfTrueAction2=[!SetOption MeterShuffle ImageTint "#AlmostWhite#"]
[MeterShuffle]
Meter=Image
ImageName=#@#Images\shuffle.png
ImageTint=#AlmostWhite#
X=(155*#Scale#)
Y=(65*#Scale#)
W=(17*#Scale#)
H=(17*#Scale#)
Group=DynamicColors
LeftMouseUpAction=[!CommandMeasure MeasureShuffle "Shuffle"]
AntiAlias=1
;-------------------------------------------------------------
[MeasureRepeat]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Repeat
IfCondition=MeasureRepeat = 0
IfTrueAction=[!SetOption MeterRepeat ImageTint "#MediumBlue#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
IfCondition2=MeasureRepeat = 1
IfTrueAction2=[!SetOption MeterRepeat ImageTint "#AlmostWhite#"][!SetOption MeterRepeat ImageName "#@#Images\repeat.png"]
IfCondition3=MeasureRepeat = 2
IfTrueAction3=[!SetOption MeterRepeat ImageTint "#AlmostWhite#"][!SetOption MeterRepeat ImageName "#@#Images\repeat1.png"]
[MeterRepeat]
Meter=Image
ImageName=#@#Images\shuffle.png
ImageTint=#AlmostWhite#
X=(175*#Scale#)
Y=(65*#Scale#)
W=(17*#Scale#)
H=(17*#Scale#)
Group=DynamicColors
LeftMouseUpAction=[!CommandMeasure MeasureRepeat "Repeat"]
AntiAlias=1
;-------------------------------------------------------------
[MeasureVolume]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Volume
MinValue=0
MaxValue=100
IfCondition=MeasureVolume = 0
IfTrueAction=[!SetOption MeterVolumeIcon ImageName "#@#Images\volMute.png"]
IfCondition2=(MeasureVolume >= 1) && (MeasureVolume <= 32)
IfTrueAction2=[!SetOption MeterVolumeIcon ImageName "#@#Images\volLow.png"]
IfCondition3=(MeasureVolume >= 33) && (MeasureVolume <= 65)
IfTrueAction3=[!SetOption MeterVolumeIcon ImageName "#@#Images\volMed.png"]
IfCondition4=MeasureVolume >= 66
IfTrueAction4=[!SetOption MeterVolumeIcon ImageName "#@#Images\volHigh.png"]
[MeterVolumeIcon]
Meter=Image
ImageName=#@#Images\volMute.png
ImageTint=#AlmostWhite#
X=(100*#Scale#)
Y=(80*#Scale#)
W=(17*#Scale#)
H=(17*#Scale#)
LeftMouseUpAction=[!CommandMeasure MeasureVolume "SetVolume 0"]
AntiAlias=1
[MeterVolumeBar]
Meter=Bar
MeasureName=MeasureVolume
BarOrientation=Horizontal
BarColor=#AlmostWhite#
SolidColor=#DarkBlue#
X=(117*#Scale#)
Y=(88*#Scale#)
W=(95*#Scale#)
H=(1.5*#Scale#)
LeftMouseUpAction=[!CommandMeasure MeasureVolume "SetVolume $MouseX:%$"]
;-------------------------------------------------------------
[MeasureVolumePercentage]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Volume
Substitute="":"N/A"
[MeterVolume]
Meter=String
StringAlign=Center
FontFace=b Bath Towel
FontColor=211,40,56
FontSize=(5*#Scale#)
X=(221*#Scale#)
Y=(86*#Scale#)
Text=%1%
MeasureName=MeasureVolumePercentage
AntiAlias=1
;-------------------------------------------------------------
[MeterBar]
Meter=Shape
X=(100*#Scale#)
Y=(40*#Scale#)
Shape=Rectangle 0,0,(130*#Scale#),(1.5*#Scale#),0 | Fill Color 255,255,255,30 | StrokeWidth 0
Shape2=Rectangle 0,0,([MeasureProgress]*1.2*#Scale#),(1.5*#Scale#),0 | Fill Color 211,40,56 | StrokeWidth 0
Shape3=Ellipse ([MeasureProgress]*1.2*#Scale#),(0.8*#Scale#),(1.5*#Scale#) |Fill Color 255,255,255 | StrokeWidth 0
Shape4=Rectangle 0,(-1*#Scale#),(120*#Scale#),(3*#Scale#),0 | Fill Color 255,255,255,1 | StrokeWidth 0
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureProgress" "SetPosition $MouseX:%$"]
[MeterPrevious]
Meter=Image
ImageName=#@#Images\Previous.png
X=(140*#Scale#)
Y=(47*#Scale#)
W=(10*#Scale#)
AntiAlias=1
SolidColor=255,255,255,1
LeftMouseUpAction=[!PluginBang "MeasureStateButton Previous"]
[MeterPlayPause]
Meter=Image
ImageName=[MeasureStateButton]
X=(155*#Scale#)
Y=(45*#Scale#)
W=(15*#Scale#)
AntiAlias=1
SolidColor=255,255,255,1
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure "MeasureStateButton" "PlayPause"]
[MeterNext]
Meter=Image
ImageName=#@#Images\Next.png
X=(175*#Scale#)
Y=(47*#Scale#)
W=(10*#Scale#)
AntiAlias=1
SolidColor=255,255,255,1
LeftMouseUpAction=[!PluginBang "MeasureStateButton Next"]