I tried completing you, but the rainmeter is blocking againeclectic-tech wrote:You modified the amount of change on every update from adding 1 to adding 3 in the [MeasureTimer] section...
This causes the 'IfEqualValue' in the [BinActionRefresh] section to never fire a '!Refresh', because the count skips right over when you add 3 on every update.
The simplest solution would be to add IfAboveValue to [BinActionRefresh] to test if the value is above...Code: Select all
[BinActionRefresh] Measure=Calc Formula=MeasureX IfEqualAction=!Refresh IfEqualValue=( 2 * #SkinWidth# ) IfAboveAction=!Refresh IfAboveValue=( 2 * #SkinWidth# )
It is currently March 28th, 2024, 3:53 pm
How to create crawling text?
Re: How to create crawling text?
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to create crawling text?
That's normal. It's not a good idea to continuously refresh a skin and especially a skin using WebParser plugins (like this one). Details: https://forum.rainmeter.net/viewtopic.php?p=136507#p136507xenium wrote:I tried completing you, but the rainmeter is blocking again
And here is another post about the undesirable skin refresh: https://forum.rainmeter.net/viewtopic.php?p=119966#p119966
Working on the solution, come back a bit later.
- eclectic-tech
- Rainmeter Sage
- Posts: 5382
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
- Contact:
Re: How to create crawling text?
Yes, I'm not disagreeing with you (other than times when !Refresh is needed to update after !WriteKeyValue bangs) ...balala wrote:Yeah, but I don't see it a good one, even if it's the simplest. Described above why.
please go ahead and offer an updated version of YOUR original (non-lua) code from 4 years ago.
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to create crawling text?
Definitely. I didn't say (or at least I didn't intend to) that the skin(s) should never have to be refreshed. Just that it's not a desirable action and as much as possible, it should be avoided.eclectic-tech wrote:Yes, I'm not disagreeing with you (other than times when !Refresh is needed to update after !WriteKeyValue bangs) ...
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to create crawling text?
Here's my workaround:xenium wrote:I want to enter the above code (horizontal version) into my wheater skin to run the name of the city. I tried but the city is running twice and then disappears and Rainmeter blocks and closes.
What's the problem?
- First, the width of the shown string should be set automatically. Setting it manually in this case is hard to be achieved, because the string can change (the same code should have to be used by other users, too). So, remove the not needed TextWidth variable.
- We also won't need any more any of the [MeasureTimer], [BinActionRefresh] and [BinActionWidth] measures. Remove all of them.
- Replace the Formula option of the still existing [MeasureX] measure, with the following one: Formula=( COUNTER % ( #SkinWidth# + [MeterText:W] )). This formula requires to also add the DynamicVariables=1 option to the same [MeasureX] measure. Don't forget it.
- Replace the X option of the [MeterText] meter, with the following one: X=(#SkinWidth#-[MeasureX]). Also remove the W and H options of the same meter.
- The last step you have to do is to set up the proper width of the skin. Add the SkinWidth=#SkinWidth# option to the [Rainmeter] section of the skin.
Please let me know if you was able to make all needed changes to your code and if it does work now well.
Re: How to create crawling text?
it works!balala wrote:Here's my workaround:I think that's all. Now the skin doesn't refresh at all.
- First, the width of the shown string should be set automatically. Setting it manually in this case is hard to be achieved, because the string can change (the same code should have to be used by other users, too). So, remove the not needed TextWidth variable.
- We also won't need any more any of the [MeasureTimer], [BinActionRefresh] and [BinActionWidth] measures. Remove all of them.
- Replace the Formula option of the still existing [MeasureX] measure, with the following one: Formula=( COUNTER % ( #SkinWidth# + [MeterText:W] )). This formula requires to also add the DynamicVariables=1 option to the same [MeasureX] measure. Don't forget it.
- Replace the X option of the [MeterText] meter, with the following one: X=(#SkinWidth#-[MeasureX]). Also remove the W and H options of the same meter.
- The last step you have to do is to set up the proper width of the skin. Add the SkinWidth=#SkinWidth# option to the [Rainmeter] section of the skin.
Please let me know if you was able to make all needed changes to your code and if it does work now well.
I let it run for about 10 minutes to see if Rainmeter is blocking
Can I also set the running speed?
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to create crawling text?
I've started to write my reply about this, when you asked. It can easily be modified.xenium wrote:Can I also set the running speed?
So, if you want to speed up the movement of the string, first add the Speed variable to the [Variables] section. This will be a generic number, which the larger is, the more the scrolling speed of the string will be higher:
Code: Select all
[Variables]
...
Speed=3
Now replace the Formula option of the [MeasureX] measure, with the following one: Formula=(( #Speed# * COUNTER ) % ( #SkinWidth# + [MeterText:W] ))
Re: How to create crawling text?
That's great !balala wrote:I've started to write my reply about this, when you asked. It can easily be modified.
So, if you want to speed up the movement of the string, first add the Speed variable to the [Variables] section. This will be a generic number, which the larger is, the more the scrolling speed of the string will be higher:Obviously Speed=3 is just an example, feel free to experiment to find the best value for your needs.Code: Select all
[Variables] ... Speed=3
Now replace the Formula option of the [MeasureX] measure, with the following one: Formula=(( #Speed# * COUNTER ) % ( #SkinWidth# + [MeterText:W] ))
Thank you very much for your help !
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to create crawling text?
You're welcome. It's always a pleasure to help, when I can.
- eclectic-tech
- Rainmeter Sage
- Posts: 5382
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
- Contact:
Re: How to create crawling text?
As a courtesy, here are balala's updated examples
Horizontal scrolling textVertical scrolling text
Very nicely done!
Horizontal scrolling text
Code: Select all
[Metadata]
Name=Running string
Description=Demonstrate how can be created a running string
[Rainmeter]
Author=balala (blaci75@gmail.com)
Update=100
AccurateText=1
SkinWidth=#SkinWidth#
MouseActionCursor=1
[Variables]
Txt=Example skin to demonstrate horizontal scroll effect.
SkinWidth=160
Speed=3
;----------------------------------------
[MeterText]
Meter=String
X=(#SkinWidth#-[MeasureX])
Y=5
FontColor=0,0,0
FontSize=16
FontFace=Stagnation BRK
FontEffectColor=255,255,255
StringStyle=BOLD
StringAlign=LEFT
StringEffect=SHADOW
SolidColor=0,0,0,1
AntiAlias=1
Text=#Txt#
DynamicVariables=1
[MeasureX]
Measure=Calc
Formula=( #Speed# * COUNTER % ( #SkinWidth# + [MeterText:W] ))
DynamicVariables=1
Code: Select all
[Metadata]
Name=Running string
Description=Demonstrate how can be created a running string
[Rainmeter]
Author=balala (blaci75@gmail.com)
Update=100
AccurateText=1
SkinHeight=#SkinHeight#
MouseActionCursor=1
[Variables]
SkinHeight=160
Txt=Example skin to demonstrate vertical scroll effect.
Speed=3
;----------------------------------------
[MeterText]
Meter=String
X=25
Y=(#SkinHeight#-[MeasureY])
FontColor=0,0,0
FontSize=16
FontFace=Stagnation BRK
FontEffectColor=255,255,255
StringStyle=BOLD
StringAlign=LEFT
StringEffect=SHADOW
SolidColor=0,0,0,1
AntiAlias=1
Text=#Txt#
Angle=(Rad(90))
DynamicVariables=1
[MeasureY]
Measure=Calc
Formula=( #Speed# * COUNTER % ( #SkinHeight# + ([MeterText:W] )))
DynamicVariables=1