Jump to content

Recommended Posts

Posted

Hello,

I am pretty sure this simple question got to be asked before, but I just couldn't find it under the search. Could someone share how to break the text in Msgbox() and InputBox(), so that the text inside the Msgbox and Inputbox popup will display in multiple lines?

Thanks.

Posted

Here's an example where @CRLF splits up a string of text into two lines.

MsgBox(0, "Test", "Line 1" & @CRLF & "Line 2")

Same way for an InputBox.

Good luck !

FootbaG
Posted

Here's an example where @CRLF splits up a string of text into two lines.

MsgBox(0, "Test", "Line 1" & @CRLF & "Line 2")

Same way for an InputBox.

Good luck !

Thanks. By the way, what is the difference between @CR, @LF, and @CRLF? They all seems to have the same effect inside my script.
Posted

Thanks. By the way, what is the difference between @CR, @LF, and @CRLF? They all seems to have the same effect inside my script.

HI,

It mostly depends on the program (not AutoIt) that you may use them in (so any will work for AutoIt) some programs use Carridge Return (@CR) to go to next Line, some Line Feed (@LF) and some (like dos i believe) prefer both CR & LF (@CRLF).

I have a hard time choosing too so I usually use the one AutoIt says is typically used for line breaks.

@LF untill it doesn't work.

Hope this helps a bit

A.B.Ames

Posted

Here's some further info to the CR/LF/CRLF saga:

  • UNIX systems use just LF to separate lines;
  • Mac systems use just CR; and
  • Windows/DOS use CRLF.
You only really need to worry about things when you're reading from or writing to files that may be used on a different system architecture. Your safest bet is to just always use @CRLF.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...