It is currently December 12th, 2018, 3:27 pm

Substitute="#CRLF#" : " "

General topics related to Rainmeter.
SparkShredder
Posts: 32
Joined: November 17th, 2017, 12:00 pm

Substitute="#CRLF#" : " "

SparkShredder » October 7th, 2018, 7:35 am

Hey, I was working on Transformers Skin and just started the Boot Sequence

Code: Select all

[IntroStyle1]
FontColor=#Color1#,250
FontEffectColor=0,0,0,100
StringEffect=BORDER
StringStyle=NORMAL
StringAlign=Left
FontFace=Autobus
FontSize=15
X=345
Y=R
AntiAlias=1

[IntroStyle2]
FontColor=#Color1#,250
FontEffectColor=0,0,0,100
StringEffect=BORDER
StringStyle=NORMAL
StringAlign=CenterCenter
FontFace=Autobus
FontSize=45
X=(1366/2)
Y=(768/2)
AntiAlias=1

[PlanetEarth]
Meter=String
MeterStyle=IntroStyle2
Y=200
Text=Planet : Earth

[BattleStat]
Meter=String
MeterStyle=IntroStyle2
Text=Battle Stats : Autobots Dominating
In with this code, Some Text occupies too much Screen Width

I want it to be like

Code: Select all

[IntroText1]
Substitute="#CRLF#" : " : "

[BattleStats]
Text=Battle Stats #CRLF# Autobots Dominating
So, That when i change it with
[!SetOption BattleStats MeterStyle "Introtext1"]
#CRLF# is replaced by :
But for some reasons, it's not replacing it.
and I really don't know why.

Here are some Shots how it is now.
Untitled1.png
Untitled.png
You do not have the required permissions to view the files attached to this post.
SparkShredder
Posts: 32
Joined: November 17th, 2017, 12:00 pm

Re: Substitute="#CRLF#" : " "

SparkShredder » October 7th, 2018, 9:38 am

I've tried some values else. like "Earth":"Mars"
and it's not working even then.
Maybe it's now working at all.
or it just works only when it's directly mentioned in Measure or the Meter itself?
User avatar
balala
Rainmeter Sage
Posts: 7161
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Substitute="#CRLF#" : " "

balala » October 7th, 2018, 10:13 am

The Substitute option can be applied ONLY on measures, not on meters. Where have you added it? Probably on meters, because the [IntroText1] looks to be a style section, which will be applied to meters. Such sections can't be applied to measures.
But please post the whole code, for more specific help.
SparkShredder
Posts: 32
Joined: November 17th, 2017, 12:00 pm

Re: Substitute="#CRLF#" : " "

SparkShredder » October 7th, 2018, 12:47 pm

balala wrote:The Substitute option can be applied ONLY on measures, not on meters. Where have you added it? Probably on meters, because the [IntroText1] looks to be a style section, which will be applied to meters. Such sections can't be applied to measures.
But please post the whole code, for more specific help.
Yeah it's a style section. Hence, it's directly applied to meters which don't even have a Measure.
So, is there any alternative method for Style Specific "substitution" ?
SparkShredder
Posts: 32
Joined: November 17th, 2017, 12:00 pm

Re: Substitute="#CRLF#" : " "

SparkShredder » October 7th, 2018, 12:55 pm

Code: Select all

[IntroHead]
FontColor=#Color1#,250
FontEffectColor=0,0,0,100
StringEffect=BORDER
StringStyle=NORMAL
StringAlign=Center
FontFace=Autobus
FontSize=25
X=(1366/2)
Y=175
AntiAlias=1 

[IntroStyle1]
FontColor=#Color1#,250
FontEffectColor=0,0,0,100
StringEffect=BORDER
StringStyle=NORMAL
StringAlign=Left
FontFace=Autobus
FontSize=15
X=345
Y=R
AntiAlias=1

[IntroStyle1a]
FontColor=#Color1#,250
FontEffectColor=0,0,0,100
StringEffect=BORDER
StringStyle=NORMAL
StringAlign=Left
FontFace=Autobus
FontSize=13
X=345
Y=R
AntiAlias=1

[IntroStyle2]
FontColor=#Color1#,250
FontEffectColor=0,0,0,100
StringEffect=BORDER
StringStyle=NORMAL
StringAlign=CenterCenter
FontFace=Autobus
FontSize=45
X=(1366/2)
Y=(768/2)
AntiAlias=1
Substitute="Planet":"Place"

;=============
[move00]
Measure=Calc
Formula=move00+(768/30)
DynamicVariables=1
Disabled=1

[ActionTimer]
Measure=Calc
Formula=ActionTimer+1
IfCondition=(ActionTimer = 10)
IfTrueAction=[!ShowMeter Online]
IfCondition2=(ActionTimer = 15)
IfTrueAction2=[!SetOption Online MeterStyle "IntroHead"][!ShowMeter PlanetEarth]
IfCondition3=(ActionTimer = 20)
IfTrueAction3=[!SetOption PlanetEarth MeterStyle "IntroStyle1"][!SetOption PlanetEarth Y "200"][!ShowMeter DamageStats]
IfCondition4=(ActionTimer = 25)
IfTrueAction4=[!SetOption DamageStats MeterStyle "IntroStyle1"][!ShowMeter BattleStats]
IfCondition5=(ActionTimer = 30)
IfTrueAction5=[!SetOption BattleStats MeterStyle "IntroStyle1"][!PauseMeasure ActionTimer]

[BangOutW]
Measure=Calc
Formula=BangOutW+80
IfEqualValue=800
IfEqualAction=[!PauseMeasure BangOutW]

[BangOutH]
Measure=Calc
Formula=BangOutH+50
IfEqualValue=500
IfEqualAction=[!PauseMeasure BangOutH]

[BlurA]
Meter=Image
SolidColor=0,0,0,220
W=#workareawidth#
H=(768/2)
X=0
Y=0

[BlurB]
Meter=Image
SolidColor=0,0,0,220
W=#workareawidth#
H=(768/2)
X=0
Y=(768/2)
DynamicVariables=1

[LogIn]
Meter=Image
ImageName=#@#Images\files\bg01.png
W=[BangOutW]
H=[BangOutH]
X=((1366/2)-[BangOutW]/2)
Y=((768/2)-[BangOutH]/2)
DynamicVariables=1

[Online]
Meter=String
MeterStyle=IntroStyle2
Text=SYSTEM ONLINE
Hidden=1

[PlanetEarth]
Meter=String
MeterStyle=IntroStyle2
Text=Loading Location
Hidden=1

[DamageStats]
Meter=String
MeterStyle=IntroStyle2
Text=- Planet Earth
Hidden=1

[BattleStats]
Meter=String
MeterStyle=IntroStyle2
Text=Battle : Autobots Dominating
Hidden=1
This is the complete code I've made so far.
Yeah, Some meter names don't match their content..I'll fix that later

Edit: Okay, I got an idea. I can make String Measures and with !SetOption, I can change MeasureName
User avatar
balala
Rainmeter Sage
Posts: 7161
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Substitute="#CRLF#" : " "

balala » October 7th, 2018, 1:22 pm

SparkShredder wrote:Yeah, Some meter names don't match their content..I'll fix that later
How do you name the meters, is completely up to you.
SparkShredder wrote:Edit: Okay, I got an idea. I can make String Measures and with !SetOption, I can change MeasureName
Yep, this is the idea. You have to create some String measures and pass the values ​​through them.
But I don't see where would you like to replace the new lines with colons. The code is working: the strings are changing, according to the value of [ActionTimer] measure. But at least for now, I can't figure out more.
SparkShredder
Posts: 32
Joined: November 17th, 2017, 12:00 pm

Re: Substitute="#CRLF#" : " "

SparkShredder » October 8th, 2018, 12:48 pm

Code: Select all

[ActionTimer]
Measure=Calc
Formula=ActionTimer+1
IfCondition=(ActionTimer = 10)
IfTrueAction=[!ShowMeter Online]
IfCondition2=(ActionTimer = 14)
IfTrueAction2=[!SetOption Online MeterStyle "IntroHead"][!ShowMeter Location]
IfCondition3=(ActionTimer = 18)
IfTrueAction3=[!SetOption Location MeasureName "Location1a"]
IfCondition4=(ActionTimer = 22)
IfTrueAction4=[!SetOption Location MeterStyle "IntroStyle1"][!SetOption Location MeasureName "Location2"][!SetOption Location Y "200"][!ShowMeter DamageStats]
IfCondition5=(ActionTimer = 26)
IfTrueAction5=[!SetOption DamageStats MeasureName "Damage1a"]
IfCondition6=(ActionTimer = 30)
IfTrueAction6=[!SetOption DamageStats MeasureName "Damage1b"]
IfCondition7=(ActionTimer = 35)
IfTrueAction7=[!SetOption DamageStats MeasureName "Damage2"][!SetOption DamageStats MeterStyle "IntroStyle1"][!ShowMeter BattleStats]
IfCondition8=(ActionTimer = 38)
IfTrueAction8=[!SetOption BattleStats MeasureName "Battle1a"]
IfCondition9=(ActionTimer = 42)
IfTrueAction9=[!SetOption BattleStats MeasureName "Battle2"][!SetOption BattleStats MeterStyle "IntroStyle1"][!PauseMeasure ActionTimer]

[BangOutW]
Measure=Calc
Formula=BangOutW+160
IfEqualValue=800
IfEqualAction=[!PauseMeasure BangOutW]

[BangOutH]
Measure=Calc
Formula=BangOutH+100
IfEqualValue=500
IfEqualAction=[!PauseMeasure BangOutH]

[BlurA]
Meter=Image
SolidColor=0,0,0,220
W=#workareawidth#
H=(768/2)
X=0
Y=0

[BlurB]
Meter=Image
SolidColor=0,0,0,220
W=#workareawidth#
H=(768/2)
X=0
Y=(768/2)
DynamicVariables=1

[LogIn]
Meter=Image
ImageName=#@#Images\files\bg01.png
W=[BangOutW]
H=[BangOutH]
X=(683-[BangOutW]/2)
Y=(384-[BangOutH]/2)
DynamicVariables=1

[Online]
Meter=String
MeterStyle=IntroStyle2
Text=SYSTEM ONLINE
Hidden=1

[Location1]
Measure=String
String="Loading Location"

[Location1a]
Measure=String
String="Loading Location#CRLF#Earth"

[Location2]
Measure=String
String="Location : Earth"

[Location]
Meter=String
MeterStyle=IntroStyle2
MeasureName=Location1
Hidden=1

[Damage1]
Measure=String
String="Inspecting Damage Taken"

[Damage1a]
Measure=String
String="Inspecting Damage Taken#CRLF#Armor Mildly Damaged"

[Damage1b]
Measure=String
String="Inspecting Damage Taken#CRLF#Internal Systems Rolling Good"

[Damage2]
Measure=String
String="Damage Report : Uncritical"

[DamageStats]
Meter=String
MeterStyle=IntroStyle2
MeasureName=Damage1
Hidden=1

[Battle1]
Measure=String
String="Great War Intel"

[Battle1a]
Measure=String
String="Great War Intel#CRLF#Autobots Dominating"

[Battle2]
Measure=String
String="Great War Intel : Autobots Dominating"

[BattleStats]
Meter=String
MeasureName=Battle1
MeterStyle=IntroStyle2
Hidden=1
This is how I got it.
Untitled-1.gif
This is how it's working
Some Frames missing]
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 7161
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Substitute="#CRLF#" : " "

balala » October 8th, 2018, 1:53 pm

Do you have any question / comment?