View Full Version : How to get a line break in a info output box?

10-09-2012, 08:51 PM

Yes, another newbie question from myself.

I'm trying to get a data report of a number of variables using 'info'.

How can I enter them all in one info box, and get line breaks between them. i.e. How do you tell the system to do a line break?


10-10-2012, 01:04 AM
I don't know about LScript, never wrote any, but in OS it's usually \n or \r\n..

10-10-2012, 10:15 AM
I tried \n and it didnt seem to work in the ctltext control nor the info options. I understand you want to use the info box, but a requester may be more beneficial in this case. Instead of using the \n you could use an array for reading out your information. Below is an example that will dynamically change window size to show all of your data. Be aware however that you may want to use a listbox if you have a lot of data, or the window in the example below may become too large.

Generic script to run in Layout:

@version 2.2
@script generic

arrayWords = @"one","two","three","four"@;
c1 = ctltext("",arrayWords);
return if !reqpost();


10-10-2012, 02:20 PM
Ok, looks like a good solution.


10-17-2012, 04:49 PM
You can also get a line break in any info box with the <br> marker inside the displayed string.
It's undocumented, of course, and you only have 2 lines total (so only one of these markers works).

10-17-2012, 04:53 PM
Great, thanks Blochi

12-07-2012, 05:24 PM
Or you could use my MsgBox dialog box script as an include. It's up here somewhere or I can post again if anyone is interested. It needs a few slilght cosmetic tweaks for LW 11 though.

It works like this:

MsgBox(MSG_CRIT,"This plugin requires <b>morphs</b> to continue.<br>Add some morphmaps and try again.","Morphs2OBJs Error", MSGBOX_CHARWIDTH);