Data on a new line

  • Hello everyone, I made an auto-registrar of accounts, how can I make sure that every new account data is written on a new line?

  • 2021-04-30_091647.png

  • I'm writing with another software and BAS in the same text file but BAS adds the line break at the end of the added data and the other software at the beginning. How can I tell BAS that he adds the line break also at the beginning of the data? Already tried to add "\r\n" before the data but this doesn't work.

  • @morpheus93 copy the contents of the file into the Variable.
    add your data to the beginning of the variable line/list.
    overwrite the entire file.

  • @morpheus93 take an ordinary notebook.
    and fill in the text from the beginning of the page. (page = file)
    If you want to add something to the beginning of the file/page, you will need to start a new file/page.
    or will you try to write something else on the page of the notebook over what you have written?

    I hope the English translation of my example is correct and clear enough.

  • @tet-vivi Thank you very much for your help. In the meantime I found out how I can change the added line break directly in BAS from end of line to the beginning of the line: In the script view of the record mode I searched for my target text-file and found the JS function "native("filesystem", "writefile", JSON.stringify({path: "\u005c\u005cposted.txt",value:(VAR_EMAIL + ";;" + VAR_PARAM).toString() + "\r\n",base64:false,append:true}))

    I simply moved the "\r\n" part to the beginning of "value:("\r\n" + VAR_EMAIL + ........." and therefore it works like I want (adds the linke break at the beginning of the line)

  • @morpheus93 I must have misunderstood you.

    "\r\n" + [[EMAIL]] + ...
    right in the data field would be enough

Log in to reply