PDA

View Full Version : Text.WriteFromString: How to set a breakrow?


Rashka
04-03-2009, 04:15 AM
Hi there,

I want to write a textfile with some Data from the registry.

My code to write the txt:

My_Docs = Shell.GetFolder(SHF_MYDOCUMENTS);
test1_bak = Label.GetText("lab_test1")
test2_bak = Label.GetText("lab_test2")

StringTEXT =("Test 1 = "..test1_bak.."");
StringTEXT = StringTEXT..("Test 2 = "..test2_bak.."");

TextFile.WriteFromString(""..My_Docs.."\\Test_Backup.txt", StringTEXT, false);


My txt looks like this:

Test 1 = testdataTest2 = testvalue

How can I set a breakrow to get a txt file like the following??

Test1 = testdata
Test2 = testvalue


regards
Rashka

azmanar
04-03-2009, 04:19 AM
Hi,

You need to place \r\n for row break like the one in red below.

StringTEXT =("Test 1 = "..test1_bak.."\r\n");
StringTEXT = StringTEXT..("Test 2 = "..test2_bak.."");

Rashka
04-03-2009, 04:28 AM
hm...
now it looks like this in my txt file:

Test1 = testdata/r/nTest2 = testvalue

regards
Rashka

Rashka
04-03-2009, 04:53 AM
ah got it^^

stupid on my site ;)

exchanged /r/n with \r\n and now it works^^

Thanks a lot!

regarda
Rashka

azmanar
04-03-2009, 06:01 AM
Hi,

I went through the same mistakes and still fumbling about.