How do I format text output?

0 favourites
  • 6 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • Hello readers.

    I'm using NWjs quite successfully so far for file I/O, but have reached a point where I need to be able to layout the text in a file for printing. The issue is that writing or appending to a file using NWjs writes as a single line. I know about the newline system expression, but that doesn't actually format the output text in the file. I can't find a reference to any system expression such as asc() that allows one to provide an ASCII value or I would try using a carriage return. Does such a thing exist? My other solution is to write a HTML string with the formatting tags I need and view the output/print as HTML.

    I would prefer not to use a separate plugin just for this single purpose, but I'd like please anyone's suggestions or comments on how to easily lay out and format my output, whether using NWjs or not.

    Thank-you.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I happen to have a requirement for this also... calling all super-smart people!

    ~Sol

  • korbaach

    The "newline" option doesn't actually format the text in the file as a "linebreak" or "carriage return". I think KodeMonkee and myself are wondering if there is a way to format the actual output with a carriage return, since "newline" doesn't actually add another line in the output. I guess it puts a special character there for reading information back into C2, however opening the file with notepad reveals that all inputs are in a single long line. We both need something that will format the text into new lines when viewed in notepad/wordpad.

    ~Sol

  • Holy wow, Batman! I always viewed the file in Notepad. The thread is indeed correct. When I make a test and open it in Wordpad.. newline works as one would wish for. Since I'm planning on printing from Wordpad on the commandline anyway, this is perfect. Thank-you, sir! Thank-you!

  • OH wow indeed... :/

    Yep, I made the same mistake... trusting notepad, lol. Oh well, that'll learn me.

    I should have actually tested wordpad myself. I'm happy to hear that wordpad will work though, since using Notepad+ isn't going to be a feasible option for my project at least.

    Thanks again korbaach

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)