How to store a %CRLF% in an ini file

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
esuohlluf
Junior Coder
Posts: 41
Joined: Thu Mar 23, 2006 5:33 am

How to store a %CRLF% in an ini file

Post by esuohlluf » Mon Apr 10, 2006 10:33 pm

I am trying to store a text string in an ini file which will be
retrieved as the TEXT for a memo box.

When I write it to the ini file the %CRLF% forces a new line,
so that when the string is read back from the ini file it is
no longer correct for the memo box.

How can I stored the %CRLF% literally instead of forcing a new line
in the ini file?

User avatar
JRL
Automation Wizard
Posts: 3517
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue Apr 11, 2006 4:42 am

Something like this:

Code: Select all

Let>memotext=Item1%CRLF%Item2%CRLF%Item3

StringReplace>memotext,%CRLF%,~carriagereturn_linefeed~,initext
EditINIFile>Filename,section,entry,%initext%

//do stuff

ReadINIFile>Filename,section,entry,var
StringReplace>var,~carriagereturn_linefeed~,%CRLF%,memotext

Later,
Dick

Edited to fix the "hosed-by-the-forum-software" script...
Last edited by JRL on Tue Jan 30, 2007 6:03 pm, edited 1 time in total.

esuohlluf
Junior Coder
Posts: 41
Joined: Thu Mar 23, 2006 5:33 am

Post by esuohlluf » Tue Apr 11, 2006 12:47 pm

Interesting. I could not locate anything in the help file.

Thank you again

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts