Hello, I recently downloaded Rainmeter and started playing around with it. I'm a novice when it comes to creating visual effects using code (did some very brief experimenting with POVRay a long time ago). I want to create a box at the bottom of my screen, which will show text crawling from right to left (English is not my first language and I have no idea if I'm using the right terminology here: Basically I want to make sort of what you see during news shows, where at the bottom of the screen there's headlines running along).
Basically I want to create a desktop that would simulate a Space Marine helmet HUD, and the crawling text would be various W40K quotes and other inspirational stuff meant to be seen by the Space Marine while in combat. If you have any other tips in helping me do this, they would be welcome. I'm using a basic Enigma skin currently to experiment, and I think a modified version of that will be the main interface and will act as the targeting reticle in the grand scheme of how my desktop will look.
Thank you!
It is currently April 28th, 2024, 2:14 am
How to create crawling text?
-
- Posts: 3
- Joined: October 14th, 2014, 1:24 am
-
- Rainmeter Sage
- Posts: 5407
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: How to create crawling text?
Here is a great tool to get crawling text... lua marquee by smurfier
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 3
- Joined: October 14th, 2014, 1:24 am
Re: How to create crawling text?
Thank you very much!eclectic-tech wrote:Here is a great tool to get crawling text... lua marquee by smurfier
-
- Rainmeter Sage
- Posts: 16182
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to create crawling text?
And here 's a solution without using lua. The first code moves the text horizontaly, the second verticaly.
Horizontaly:
and verticaly:
Of course, you can play arround to create a background. I'd do that with an image meter, using a solidcolor.
Horizontaly:
Code: Select all
[Metadata]
Name=Running string
Description=Demonstrate how can be created a running string
[Rainmeter]
Author=balala (blaci75@gmail.com)
Update=100
MouseActionCursor=1
[Variables]
TextWidth=140
SkinWidth=160
Txt=Example skin
;----------------------------------------
[MeterText]
Meter=String
X=[MeasureX]
Y=5
W=[BinActionWidth]
H=30
FontColor=0,0,0
FontSize=16
FontFace=Stagnation BRK
FontEffectColor=255,255,255
StringStyle=BOLD
StringAlign=LEFT
StringEffect=SHADOW
AntiAlias=1
Text=#Txt#
DynamicVariables=1
[MeasureTimer]
Measure=Calc
Formula=( MeasureTimer + 1 )
[MeasureX]
Measure=Calc
Formula=(( MeasureX < ( -1 * #TextWidth# )) ? ( 2 * #SkinWidth# ) : ( #SkinWidth# - MeasureTimer ))
[BinActionRefresh]
Measure=Calc
Formula=MeasureX
IfEqualAction=!Refresh
IfEqualValue=( 2 * #SkinWidth# )
[BinActionWidth]
Measure=Calc
Formula=((( #SkinWidth# - MeasureX ) < #TextWidth# ) ? ( #SkinWidth# - MeasureX ) : #TextWidth# )
Code: Select all
[Metadata]
Name=Running string
Description=Demonstrate how can be created a running string
[Rainmeter]
Author=balala (blaci75@gmail.com)
Update=100
MouseActionCursor=1
[Variables]
TextWidth=140
SkinWidth=160
Txt=Example skin
;----------------------------------------
[MeterText]
Meter=String
X=25
Y=[MeasureX]
W=50
H=[BinActionWidth]
FontColor=0,0,0
FontSize=16
FontFace=Stagnation BRK
FontEffectColor=255,255,255
StringStyle=BOLD
StringAlign=LEFT
StringEffect=SHADOW
AntiAlias=1
Text=#Txt#
Angle=1.5707963267948966192313216916398
DynamicVariables=1
[MeasureTimer]
Measure=Calc
Formula=( MeasureTimer + 1 )
[MeasureX]
Measure=Calc
Formula=(( MeasureX < ( -1 * #TextWidth# )) ? ( 2 * #SkinWidth# ) : ( #SkinWidth# - MeasureTimer ))
[BinActionRefresh]
Measure=Calc
Formula=MeasureX
IfEqualAction=!Refresh
IfEqualValue=( 2 * #SkinWidth# )
[BinActionWidth]
Measure=Calc
Formula=((( #SkinWidth# - MeasureX ) < #TextWidth# ) ? ( #SkinWidth# - MeasureX ) : #TextWidth# )
-
- Posts: 3
- Joined: October 14th, 2014, 1:24 am
Re: How to create crawling text?
Thank you!
-
- Posts: 868
- Joined: January 4th, 2018, 9:52 pm
Re: How to create crawling text?
Hi,
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?
This is the code:
Thanks
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?
This is the code:
Code: Select all
[Rainmeter]
Author=xenium
Update=100
MouseActionCursor=1
[Variables]
TextWidth=140
SkinWidth=160
URL=https://www.foreca.com/Japan/Tokyo?tenday
URL1=https://www.foreca.com/Japan/Tokyo
;----------------------------------------
[MeasureName]
Measure=Plugin
Plugin=Plugins/WebParser.dll
Url=#URL#
RegExp="(?siU)<h1>(.*)</h1>.*"
UpdateRate=#UpdateRateSeconds#
Substitute="°":""
StringIndex=1
[image]
meter=image
imagename=rain.png
x=0
y=0
w=160
[MeterText]
Meter=String
MeasureName=MeasureName
X=[MeasureX]
Y=5
W=[BinActionWidth]
H=30
FontColor=0,0,0
FontSize=16
FontFace=Stagnation BRK
FontEffectColor=255,255,255
StringStyle=BOLD
StringAlign=LEFT
StringEffect=SHADOW
AntiAlias=1
DynamicVariables=1
[MeasureTimer]
Measure=Calc
Formula=( MeasureTimer + 3 )
[MeasureX]
Measure=Calc
Formula=(( MeasureX < ( -1 * #TextWidth# )) ? ( 2 * #SkinWidth# ) : ( #SkinWidth# - MeasureTimer ))
[BinActionRefresh]
Measure=Calc
Formula=MeasureX
IfEqualAction=!Refresh
IfEqualValue=( 2 * #SkinWidth# )
[BinActionWidth]
Measure=Calc
Formula=((( #SkinWidth# - MeasureX ) < #TextWidth# ) ? ( #SkinWidth# - MeasureX ) : #TextWidth# )
-
- Rainmeter Sage
- Posts: 5407
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: How to create crawling text?
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...Using IfCondition would be another way of doing this (at the time this code was posted, IfCondition was not available).
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# )
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Rainmeter Sage
- Posts: 16182
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to create crawling text?
This isn't a good solution (sorry eclectic-tech - this is my opinion), because usually it's not a good idea to refresh the skins and especially the skins using WebParser measure(s). The initial code was written for a static string, set up in the [Variables] section, as the Txt variable. But here things are different, I'd renounce to the continuous refresh.eclectic-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...Using IfCondition would be another way of doing this (at the time this code was posted, IfCondition was not available).Code: Select all
[BinActionRefresh] Measure=Calc Formula=MeasureX IfEqualAction=!Refresh IfEqualValue=( 2 * #SkinWidth# ) IfAboveAction=!Refresh IfAboveValue=( 2 * #SkinWidth# )
After the initial skin was written, a lot of new features was added to Rainmeter. Using these, the code can be easily improved.
Right now I'm working on it, immediately I'll post an updated code.
-
- Rainmeter Sage
- Posts: 5407
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: How to create crawling text?
Well it's about time you updated this!
I was offering the simplest solution for the OP ...
Yes, there are new ways to achieve this, as I am sure your new approach will show...
I was offering the simplest solution for the OP ...
Yes, there are new ways to achieve this, as I am sure your new approach will show...
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Rainmeter Sage
- Posts: 16182
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: How to create crawling text?
Yeah, but I don't see it a good one, even if it's the simplest. Described above why.eclectic-tech wrote:I was offering the simplest solution for the OP ...