Yep, right. But in this case it is, isn't it?xenium wrote:this solution is good when the width of the text is small but when the width of the text is larger and does not fit in the width of the skin, it does not work
It is currently April 25th, 2024, 12:08 pm
How to create crawling text?
-
- Rainmeter Sage
- Posts: 16168
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to create crawling text?
-
- Posts: 866
- Joined: January 4th, 2018, 9:52 pm
Re: How to create crawling text?
In the above situation yes, is a solution.balala wrote:Yep, right. But in this case it is, isn't it?
But in my case the text will have the width bigger than the skin, so the solution above can not use it.
It would be good if there was a solution to the situation that I exposed at the beginning
-
- Rainmeter Sage
- Posts: 16168
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to create crawling text?
In such cases I don't understand how would you like to move the string. If it's wider then the skin, thenxenium wrote:But in my case the text will have the width bigger than the skin, so the solution above can not use it.
It would be good if there was a solution to the situation that I exposed at the beginning
makes not too much sense in my opinion. Could you please post some images with the most extreme (left and right) position of the string? I thought to some very simple images (see the attachements). Probably it's not unachievable, but I can't imagine yet how the string should have to move.xenium wrote:for example if the skin width = 160, the text runs between 140 and 20.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 866
- Joined: January 4th, 2018, 9:52 pm
Re: How to create crawling text?
In the skin below, I would like the text to run inside the frame, not overbalala wrote: Could you please post some images with the most extreme (left and right) position of the string?
You do not have the required permissions to view the files attached to this post.
-
- Rainmeter Sage
- Posts: 16168
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to create crawling text?
The simplest solution I think is the following: add a Frame variable to the [Variables] section. This variable represents the thickness of the edge (where the string won't run):
I set it to 10, because in the image used as background, this is the approximate thickness of the yellow frame.
Then modify the Formula option of the [MeasureX] measure, as it follows: Formula=( Clamp (( #Speed# * COUNTER % ( #SkinWidth# + [MeterText:W] )), #Frame#, ( #SkinWidth# + [MeterText:W] - #Frame# ))).
Probably if you're using the posted background (with the thin yellow border), this solution will be good enough. But with this solution, there is a period, in which the string doesn't move on its most right and most left position. The more the thickness of that part is increasing, the more time the string will stay unmoving. That's why I say maybe this isn't the best solution, but please try it out first, then we'll see.
Code: Select all
[Variables]
...
Frame=10
Then modify the Formula option of the [MeasureX] measure, as it follows: Formula=( Clamp (( #Speed# * COUNTER % ( #SkinWidth# + [MeterText:W] )), #Frame#, ( #SkinWidth# + [MeterText:W] - #Frame# ))).
Probably if you're using the posted background (with the thin yellow border), this solution will be good enough. But with this solution, there is a period, in which the string doesn't move on its most right and most left position. The more the thickness of that part is increasing, the more time the string will stay unmoving. That's why I say maybe this isn't the best solution, but please try it out first, then we'll see.
-
- Posts: 866
- Joined: January 4th, 2018, 9:52 pm
Re: How to create crawling text?
what I notice, the only difference now is that the text starts running from the inner edge of the frame, but it still runs over the frame.balala wrote:The simplest solution I think is the following: add a Frame variable to the [Variables] section. This variable represents the thickness of the edge (where the string won't run):I set it to 10, because in the image used as background, this is the approximate thickness of the yellow frame.Code: Select all
[Variables] ... Frame=10
Then modify the Formula option of the [MeasureX] measure, as it follows: Formula=( Clamp (( #Speed# * COUNTER % ( #SkinWidth# + [MeterText:W] )), #Frame#, ( #SkinWidth# + [MeterText:W] - #Frame# ))).
Probably if you're using the posted background (with the thin yellow border), this solution will be good enough. But with this solution, there is a period, in which the string doesn't move on its most right and most left position. The more the thickness of that part is increasing, the more time the string will stay unmoving. That's why I say maybe this isn't the best solution, but please try it out first, then we'll see.
In my view, the text should appear from the right inner edge of the frame and disappear into the left inner edge of the frame. It does not pass over the frame, neither when it appears nor when it disappears
-
- Rainmeter Sage
- Posts: 16168
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to create crawling text?
Again there is a simplest solution. Should have to create a .png image which should have the yellow edge and in its center it should have to be transparent. Then you should have to put this image over the skin, AFTER the [MeterText] meter.xenium wrote:In my view, the text should appear from the right inner edge of the frame and disappear into the left inner edge of the frame. It does not pass over the frame, neither when it appears nor when it disappears
See the attached Frame.png. Save it into the config (in the posted example into the Test crawling folder), near the bg.png file.
Then add the following meter, immediately after the [MeterText] String meter:
Code: Select all
[MeterFrame]
Meter=Image
ImageName=Frame.png
X=0
Y=0
You do not have the required permissions to view the files attached to this post.
-
- Posts: 866
- Joined: January 4th, 2018, 9:52 pm
Re: How to create crawling text?
Simpler than that, it could not!balala wrote:Again there is a simplest solution. Should have to create a .png image which should have the yellow edge and in its center it should have to be transparent. Then you should have to put this image over the skin, AFTER the [MeterText] meter.
See the attached Frame.png. Save it into the config (in the posted example into the Test crawling folder), near the bg.png file.
Then add the following meter, immediately after the [MeterText] String meter:This way you're covering the parts of the string that shouldn't have to be visible.Code: Select all
[MeterFrame] Meter=Image ImageName=Frame.png X=0 Y=0
I did not even think of it!
Thank you very much
-
- Rainmeter Sage
- Posts: 16168
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to create crawling text?
I'm glad if you like it. Limiting the width of the string would be hard enough.xenium wrote: Simpler than that, it could not!
I did not even think of it!
Thank you very much
-
- Posts: 866
- Joined: January 4th, 2018, 9:52 pm
Re: How to create crawling text?
Hi,
I have a scrolling text that after adding a sliding panel is no longer fully displayed.
Unlike [MeterPrefix] that has a fixed position, for [MeterName] I do not know how to fix the problem.
this is the code
I have a scrolling text that after adding a sliding panel is no longer fully displayed.
Unlike [MeterPrefix] that has a fixed position, for [MeterName] I do not know how to fix the problem.
this is the code
Code: Select all
[Rainmeter]
Update=100
DynamicWindowSize=1
AccurateText=1
MouseActionCursor=1
SkinWidth=#SkinWidth#
[Variables]
Speed=3
SkinWidth=210
UpdateRateSeconds=6000
FontFace=arial
URL=http://aqicn.org/city/korea/seoul/yongsan-gu/
OffSet1=210
StateA=1
U1=[!UpdateMeasure MeasureSlider][!UpdateMeter "MeterInfo"][!Redraw]
[MeasureName]
Measure=WebParser
Url=#URL#
RegExp=(?siU)<a href='http://aqicn.org/.*' title='.*' class='aqihreftarget' id='aqiwgttitle1' ><b>(.*)</b></a>:
UpdateRate=#UpdateRateSeconds#
StringIndex=1
[MeasureX]
Measure=Calc
Formula=( #Speed# * COUNTER % ( #SkinWidth# + [MeterName:W] ))
DynamicVariables=1
[MeasureSlider]
Measure=Plugin
Plugin=ActionTimer
ActionList1=Repeat SlideLeft1, 2, 22 | ChangeToState2
SlideLeft1=[!SetVariable OffSet1 "(Clamp(#OffSet1#-10,7,210))"]#U1#
ChangeToState2=[!SetVariable StateA 2]
ActionList2=Repeat SlideRight1, 2, 22 | ChangeToState1
SlideRight1=[!SetVariable OffSet1 "(Clamp(#OffSet1#+10,7,210))"]#U1#
ChangeToState1=[!SetVariable StateA 1]
DynamicVariables=1
[BG1]
Meter=Image
SolidColor=0,0,0,100
X=0
Y=0
W=210
H=300
[MeterPrefix]
Meter=String
X=(#Offset1#-120)
Y=80
W=100
H=50
FontColor=255,255,255,255
StringStyle=Normal
StringEffect=SHADOW
FontFace=arial
StringAlign=left
FontEffectColor=0,0,0,80
AntiAlias=1
ClipString=1
FontSize=10
Prefix="Station"
[MeterName]
Meter=String
MeasureName=MeasureName
X=(#SkinWidth#-[MeasureX])
Y=105
FontColor=255,255,255,255
StringStyle=Normal
StringEffect=SHADOW
FontFace=arial
StringAlign=left
FontEffectColor=0,0,0,80
AntiAlias=1
ClipString=1
FontSize=10
DynamicVariables=1
[MeterInfo]
Meter=Image
ImageName=#@#Panel.png
X=#OffSet1#
Y=5
DynamicVariables=1
[button]
Meter=IMAGE
ImageName=#@#button.png
X=127
Y=1
AntiAlias=1
DynamicVariables=1
LeftMouseUpAction=[!CommandMeasure MeasureSlider "Execute #StateA#"]
SolidColor=0,0,0,1