It is currently June 29th, 2024, 4:38 am

Scrolling text

Get help with creating, editing & fixing problems with skins
Crash
Posts: 47
Joined: February 12th, 2020, 1:53 am

Scrolling text

Post by Crash »

I'm trying to make a string scoll like done in this gif https://gyazo.com/035750037ada397c6e79f292a7166993
I have no Ida where to start, I have the music setup shown in this gif, I'm just not sure how to limit it to X characters and scroll between them.
any help would be much appreciated!
User avatar
balala
Rainmeter Sage
Posts: 16358
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Scrolling text

Post by balala »

Crash wrote: April 4th, 2020, 3:33 pm I'm trying to make a string scoll like done in this gif https://gyazo.com/035750037ada397c6e79f292a7166993
First please post the code you have so far.
Crash
Posts: 47
Joined: February 12th, 2020, 1:53 am

Re: Scrolling text

Post by Crash »

Sorry for the late reply, I don't have much as I'm working off someone elses skin, but I have

Code: Select all

[TopText]
Meter=String
MeterStyle=styleTextMajor
MeasureName=#topText##MusicSwitch#
X=#topTextPositionHor#
Y=(#skinSize#*0.14)
FontFace=#thinFont#
Text="%1" 
StringAlign=#mediaTextAlignment#

[BottomText]
Meter=String 
MeterStyle=styleTextMajor
MeasureName=#bottomText##MusicSwitch#
X=r
Y=R
FontFace=#thickFont#
Text="%1" 
StringAlign=#mediaTextAlignment#
Which controlls the parts I want to have this effect
though I have no idea how this effect would be acheived
Last edited by eclectic-tech on April 5th, 2020, 3:13 am, edited 1 time in total.
Reason: Please use code tags. It is the </> symbol.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5441
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Scrolling text

Post by eclectic-tech »

This is not enough to work with... there are undefined #variables# and measures which make it impossible to offer any help.
Please post the entire skin, the entire package (.rmskin), or a link to where a working example can be downloaded.
User avatar
Yincognito
Rainmeter Sage
Posts: 7559
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Scrolling text

Post by Yincognito »

Crash wrote: April 4th, 2020, 3:33 pm I'm trying to make a string scoll like done in this gif https://gyazo.com/035750037ada397c6e79f292a7166993
I have no Ida where to start, I have the music setup shown in this gif, I'm just not sure how to limit it to X characters and scroll between them.
any help would be much appreciated!
There you go:

Code: Select all

[Variables]
ContainerWidth=169
TextWidth=0
ScrollingStep=10
SlidingStep=1
CurrentStep=(#SlidingStep#)
SlidingUpdate=24
EatCharUpdate=150
Text="SOUL'd OUT - ALIVE"

[Rainmeter]
AccurateText=1
Update=#SlidingUpdate#

---Measures---

[MeasureEatChars]
Disabled=1
Measure=String
String=""
UpdateDivider=(#EatCharUpdate#/#SlidingUpdate#)
RegExpSubstitute=1
Substitute="^.{1}(.*)$":"\1","^\\1$":""
IfMatch=^$
IfMatchAction=[!SetOption MeterText Text ""][!UpdateMeter "MeterText"][!DisableMeasure "MeasureEatChars"][!UpdateMeasure "MeasureEatChars"]
IfNotMatchAction=[!SetOption MeasureEatChars String "[MeasureEatChars]"][!SetOption MeterText Text "[MeasureEatChars]"][!UpdateMeter "MeterText"]
IfMatchMode=1
DynamicVariables=1

[MeasureCounter]
Group=CounterGroup
Disabled=1
Measure=Calc
Formula=((MeasureCounter<0)?(#ContainerWidth#):((MeasureCounter>=(#TextWidth#))?(#TextWidth#):(MeasureCounter+#CurrentStep#)))
OnUpdateAction=[!SetOption MeterText X (#ContainerWidth#-[MeasureCounter])][!UpdateMeter *][!Redraw]
IfCondition=(MeasureCounter<0)
IfTrueAction=[!UpdateMeter *][!UpdateMeasure "MeasureCounter"]
IfCondition2=(MeasureCounter>=(#TextWidth#)) && (#TextWidth#<>0)
IfTrueAction2=[!EnableMeasure "MeasureEatChars"]
IfConditionMode=1
DynamicVariables=1

---Meters---

[MeterBackground]
Meter=Shape
Shape=Rectangle 0,0,169,13 | StrokeWidth 0.5 | Stroke Color 255,64,32 | Fill Color 32,32,32,128
UpdateDivider=-1

[MeterContainer]
Meter=Shape
X=0
Y=0
Shape=Rectangle 0,0,169,13 | Fill Color 0,0,0,255 | StrokeWidth 0
UpdateDivider=-1
MouseOverAction=[!PauseMeasure "MeasureCounter"]
MouseLeaveAction=[!UnpauseMeasure "MeasureCounter"]
MouseScrollUpAction=[!SetVariable CurrentStep (-#ScrollingStep#)][!UnpauseMeasure "MeasureCounter"][!UpdateMeasure "MeasureCounter"][!PauseMeasure "MeasureCounter"][!SetVariable CurrentStep (#SlidingStep#)]
MouseScrollDownAction=[!SetVariable CurrentStep (#ScrollingStep#)][!UnpauseMeasure "MeasureCounter"][!UpdateMeasure "MeasureCounter"][!PauseMeasure "MeasureCounter"][!SetVariable CurrentStep (#SlidingStep#)]
LeftMouseUpAction=[!DisableMeasure "MeasureEatChars"][!SetOption MeasureEatChars String "#Text#"][!UpdateMeasure "MeasureEatChars"][!SetOption MeterText Text "#Text#"][!UpdateMeter "MeterText"][!UnpauseMeasure "MeasureCounter"][!UpdateMeasure "MeasureCounter"][!DisableMeasure "MeasureCounter"][!UpdateMeasure "MeasureCounter"][!EnableMeasure "MeasureCounter"][!UpdateMeasure "MeasureCounter"][!PauseMeasure "MeasureCounter"]
DynamicVariables=1

[MeterText]
Meter=String
Container=MeterContainer
FontFace=Tahoma
FontSize=7
FontWeight=400
FontColor=255,255,255,255
FontEffectColor=0,0,0,255
StringEffect=Shadow
Antialias=1
ClipString=0
X=(#ContainerWidth#)
Y=0
Text=#Text#
UpdateDivider=-1
OnUpdateAction=[!SetVariable TextWidth [MeterText:W]]
DynamicVariables=1
If you have questions on what is happening in the skin, feel free to ask. However, adapting this to your scenario (which nobody here has any idea what it is, from the small bits of code you posted) is entirely up to you. You probably want to do something like this to show the artist and song of a music player, but just so you know, it's not going to be very easy, especially for what it seems to be your level. Brave men always try though... ;-)

EDIT: Forgot to mention: you trigger (or re-trigger) the whole thing by left clicking the mouse.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Crash
Posts: 47
Joined: February 12th, 2020, 1:53 am

Re: Scrolling text

Post by Crash »

Ach I'm so sorry, I'm trying to show little code because I'm using someones code and I know some pleces really frown upon that (even though this is personal use)
Using your code I think Ive almost setup The way I want this to look, but I'm having an issue of when it "triggers" it places it at the origional container location, I can't exactly find where that's handled, (I'm aware that there are 2 top text boxes, both are the same, just so I could copy it over to the [MeterText] easier )
https://drive.google.com/open?id=1acDoeaiBVXRD0rGW9kV3QM_QpIeAi7Dt
User avatar
Yincognito
Rainmeter Sage
Posts: 7559
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Scrolling text

Post by Yincognito »

Crash wrote: April 5th, 2020, 12:19 pm Ach I'm so sorry, I'm trying to show little code because I'm using someones code and I know some pleces really frown upon that (even though this is personal use)
Using your code I think Ive almost setup The way I want this to look, but I'm having an issue of when it "triggers" it places it at the origional container location, I can't exactly find where that's handled, (I'm aware that there are 2 top text boxes, both are the same, just so I could copy it over to the [MeterText] easier )
https://drive.google.com/open?id=1acDoeaiBVXRD0rGW9kV3QM_QpIeAi7Dt
So you want those two texts (artist and title) to scroll/slide from right and then have their characters dissapear from left to right, don't you? If that's the case, maybe Raiguard's post from Tips & Tricks section is more appropriate, since the ActionTimer plugin lets the update rate of the skin unchanged. Maybe balala or eclectic-tech can help with ActionTimer, as they are more proficient in that than I am...

P.S. You should have posted the original skin though: ClearText by Redsaph.
Last edited by Yincognito on April 5th, 2020, 3:47 pm, edited 1 time in total.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Crash
Posts: 47
Joined: February 12th, 2020, 1:53 am

Re: Scrolling text

Post by Crash »

Yincognito wrote: April 5th, 2020, 3:41 pm So you want those two texts (artist and title) to scroll/slide from right and then have their characters dissapear from left to right, don't you?

P.S. You should have posted the original skin though: ClearText by Redsaph.
sorry, but yes thats the intended goal, in the one I posted it removes the top (you have to remove the box) as it should.
User avatar
balala
Rainmeter Sage
Posts: 16358
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Scrolling text

Post by balala »

Crash wrote: April 5th, 2020, 12:19 pm I'm trying to show little code because I'm using someones code
Doesn't matter, Rainmeter skins codes in most cases can be used freely, accordingly to the Creative Commons license guidelines.
But definitely would be much easier to anyone to help if we'd have enough information (yep, I read Yincognito's reply about the original skin, however take into account that: https://forum.rainmeter.net/viewtopic.php?f=5&t=28421#p148358).
Crash
Posts: 47
Joined: February 12th, 2020, 1:53 am

Re: Scrolling text

Post by Crash »

Ahh I see, So sorry, won't let it happen again!

Edit: I also don't want it to seem like I'm just asking others to do it for me, I do want to understand and learn the process of what I'm doing for future refrence