Write a tag to a txt file

Hello, I wonder if is possible to write a line break every time I write to a txt file

with this code I get the following

data = event.source.parent.getComponent('turno1').text filename = system.file.saveFile("MyDownloadedFile.txt") if filename != None: system.file.writeFile(filename, data,1)

But I want something like this

Sure, just append a newline character to data before you write it…

data = event.source.parent.getComponent('turno1').text + '\n'

Its not working with “notepad” but works with “wordpad”, It is possible to do this with notepad?



Maybe you need to write a carriage return before the linefeed for notepad to pick it up… use ‘\r\n’ instead.


Thanks Keevin, That worked!