Search code examples
autoit

Continue a command on the next line


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.


Solution

  • Place an underscore at the end of the line:

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