It is currently April 12th, 2021, 2:53 am

Copying variables

Report bugs with the Rainmeter application and suggest features.
Henk1956
Posts: 7
Joined: January 17th, 2020, 10:59 pm

Copying variables

Post by Henk1956 »

I have the following in lines in an .ini file:

[Variables]
Nr=5
Text5=Hallo,#CRLF#this is me.

If I use the following bang:

[!WriteKeyValue Variables MyText "[#Text[&Nr]]" "#@#Variables.inc"]

The #CRLF# in the text is expanded and the entry in Variables.inc looks as follows:

MyText=Hallo,
this is me.

How can I make MyText to be the same as in Text5 (keep the #CRLF# so MyText=Hallo,#CRLF#this is me.)?
User avatar
jsmorley
Developer
Posts: 21614
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Copying variables

Post by jsmorley »

Henk1956 wrote: March 22nd, 2021, 12:46 am I have the following in lines in an .ini file:

[Variables]
Nr=5
Text5=Hallo,#CRLF#this is me.

If I use the following bang:

[!WriteKeyValue Variables MyText "[#Text[&Nr]]" "#@#Variables.inc"]

The #CRLF# in the text is expanded and the entry in Variables.inc looks as follows:

MyText=Hallo,
this is me.

How can I make MyText to be the same as in Text5 (keep the #CRLF# so MyText=Hallo,#CRLF#this is me.)?
https://docs.rainmeter.net/manual/skins/option-types/#AsteriskEscape

Text5=Hallo,#*CRLF*#this is me.


Note that this: "[#Text[&Nr]]" is also wrong, and must be "[#Text[#Nr]]" since you are nesting two variables, not a variable and a measure.