How do I format text output?

Get help using Construct 2

Post » Tue Sep 08, 2015 3:02 am

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.
B
4
Posts: 14
Reputation: 230

Post » Sat Sep 12, 2015 3:21 am

I happen to have a requirement for this also... calling all super-smart people!

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
80
S
34
G
40
Posts: 3,029
Reputation: 30,393

Post » Sat Sep 12, 2015 7:50 am

Image
B
64
S
23
G
7
Posts: 1,481
Reputation: 10,823

Post » Sat Sep 12, 2015 9:51 am

@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
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
80
S
34
G
40
Posts: 3,029
Reputation: 30,393

Post » Sat Sep 12, 2015 3:14 pm

Message: KodeMonkee is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
korbaach wrote:



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!
B
4
Posts: 14
Reputation: 230

Post » Sun Sep 13, 2015 3:55 am

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
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
80
S
34
G
40
Posts: 3,029
Reputation: 30,393


Return to How do I....?

Who is online

Users browsing this forum: el3um4s, Ryan Kocourek, TylerJS and 9 guests