!alert and !confirm question Thread last updated on 2006-02-27 06:53:33

Posted by member 212670 on 2006-02-13 04:48:38

Hi,

I have two questions:

First, how do I install Litestep?

Second, is there a way to make a new line in an !alert or !confirm? \n and <br> don't do it.

Posted by member 1949 on 2006-02-13 09:50:53 link

afaik it can not be done...

Posted by member 212670 on 2006-02-13 13:56:00 link

I've actually done it before using lslua (lslua will translate the \n to a new line for you)... but I have too much mzscript written to convert it just for the sake of a new line.

I'm guessing it would have to be an ls core function, for my situation.

Posted by member 1949 on 2006-02-13 21:08:18 link

You know me with lslua...

I tried to no avail with mzscript.

Posted by member 12798 on 2006-02-26 08:29:32 link

in lua, you must use \r\n, not just \n. just tried it, it works for !alert.

edit: oops, guess i should read more carefully...

Posted by member 37809 on 2006-02-26 09:01:28 link

I just realized we were talking about !alert in the context of lslua, where lslua.message_box is more or less the same. But anything able to inject linefeed chars could do it too; the embedded newlines to !alert require there be a body and title (two arguments).

But you're also asking for ls core to handle escape codes.
We also want escape codes for $, ', and "

Posted by member 212670 on 2006-02-26 13:52:09 link

Just \n worked fine for lslua, when I tried it.

tnl, ya, that's the ticket.

Posted by member 248213 on 2006-02-27 02:02:40 link

uh... use the installer!!! effing n00b!

and yeah, I have wanted new lines in alerts for ages too... cool to know I can do it with lua ;) cheers

Posted by member 12798 on 2006-02-27 06:53:33 link

nevermind, i'm an idiot. (however, you need \r\n for xlabel texts (if you must save a few chars in order to work around the lslua-too-long-string-bug and therefore cannot use br-tags).)