It is currently April 19th, 2024, 2:29 am

WebNowPlaying - moving text

Get help with creating, editing & fixing problems with skins
Kraha
Posts: 11
Joined: November 9th, 2018, 9:26 pm

WebNowPlaying - moving text

Post by Kraha »

I'm using plugin Simplon and there is WebPlayer plugin where text (Artist and Title) are been typing, but width isn't defined. I want to make it that title or/and artist name will working like now (i dont know how to name it so i will call 'typing') but in defined width. I know it's something about 'marquee' but i dont know what exactly should I add/change into this code. Any one can help? Because now, if title name is long (about 100 letters) all of them are on desktop, i just want to make it moving in 'width' that i want.

Code: Select all

[Rainmeter]
Update=300
Author=Connect-R
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,1

[Variables]
@include=#@#Variables.inc
@include2=#@#Language\#Language#.inc
CharacterIndex=0
TextToType= [MeasureTitle]

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureArtist]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Artist
UpdateDivider=5

[MeasureTitle]
Measure=Plugin
Plugin=WebNowPlaying
PlayerType=Title
UpdateDivider=5

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeasureStrLenInfo]
Measure=String
String=#TextToType#
RegExpSubstitute=1
Substitute=".":"1+","\+$":""
DynamicVariables=1

[MeasureStrLen]
Measure=Calc
Formula=[MeasureStrLenInfo]
DynamicVariables=1

[MeasureCharacterIndex]
Measure=Calc
Formula=#CharacterIndex#
IfConditionMode=1
IfCondition=#CURRENTSECTION#=[MeasureStrLen]
IfTrueAction=[!SetVariable "CharacterIndex" "1"]
IfFalseAction=[!SetVariable "CharacterIndex" "(#CharacterIndex# + 1)"]
DynamicVariables=1

[MeasureTextToType]
Measure=String
String=#TextToType#
RegExpSubstitute=1
Substitute="^(.{#CharacterIndex#,#CharacterIndex#}).*$":"\1"
DynamicVariables=1

;-------------------------------------------------------------
;-------------------------------------------------------------

[MeterArtist]
Meter=String
MeasureName=MeasureArtist
StringAlign=Left
StringCase=Upper
FontFace=Montserrat SemiBold
FontColor=#TextColor#,150
FontSize=12
X=0
Y=0
Text="%1"
AntiAlias=1

[MeterTitle]
Meter=String
StringAlign=Left
StringCase=Upper
FontFace=Montserrat Light
FontColor=#TextColor#
FontSize=12
X=r
Y=20r
Text="[MeasureTextToType] "
PostFix=""
AntiAlias=1
DynamicVariables=1
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: WebNowPlaying - moving text

Post by balala »

Kraha wrote: November 11th, 2018, 10:31 am I'm using plugin Simplon and there is WebPlayer plugin where text (Artist and Title) are been typing, but width isn't defined. I want to make it that title or/and artist name will working like now (i dont know how to name it so i will call 'typing') but in defined width. I know it's something about 'marquee' but i dont know what exactly should I add/change into this code. Any one can help? Because now, if title name is long (about 100 letters) all of them are on desktop, i just want to make it moving in 'width' that i want.
Not sure what the Simplon plugin is, nor where are you using it, but let's clarify something first: you can add a width to the String meters (adding a W=200 - or whatever width you'd like - option to both the [MeterArtist] and [MeterTitle] meters). This makes them to have fixed width.
Now if the title or the artist's name is longer you'd want to move them from right to left, to have a fixed width, but to can read all? If this is right, a while ago a such question has been discussed here. The topic is quite long, try to figure out what is written there. Please ask if you don't understand something.