7

Is there a way to continue a command on a new line? My MsgBox() function call is long, for the sake of readability I want to do something like this:

$confirm = MsgBox(321, "Check Information", "Confirmation Number:     " & @LF &
                                            "Amount:                  $")

This returns a syntax error and points to the end of the first line as being the location of the error.

user4157124
  • 2,809
  • 13
  • 27
  • 42
Anthony Miller
  • 15,101
  • 28
  • 69
  • 98
  • Related: [1](https://stackoverflow.com/questions/44338176/split-large-string-using-autoit/44339495#44339495), [2](https://stackoverflow.com/questions/27228798/cant-figure-out-how-to-declare-a-string-array-on-multiple-lines/27233968#27233968). – user4157124 Jun 05 '17 at 22:56

1 Answers1

12

Place an underscore at the end of the line:

$confirm = msgbox(321, "Check Information", "Confirmation Number:     " & @LF & _
                                            "Amount:                  $")
Daniel Haley
  • 51,389
  • 6
  • 69
  • 95