How To Continue A Text Message On A New Line?


dle

Recommended Posts

Posted

on the script

For example: System.MessageBox("Message .......is too long.....I don't want to continue on this line

                                                             but want to continue writting on the new line","help")

 

What symbol that tell DF that the text on the new line is still in the messagebox? 

Posted

I find the easiest it to build up a string:

 

private string out = "Message...."

out += "is too long...."

out += "I don't want to continue on this line..."

etc...

 

system.messageBox(out)

 

As for forcing a new line in the message box, I can't say exactly.  The box is actually a Windows generated box, so it handles it.  Try adding chr(13) or chr(10) (or both):

 

private string out = "this is the first line" + chr(10)

out += "this is the second line"

system.messageBox(out)

 

You'll have to experiment.

Posted

Unless you're asking about how to make one statement span multiple lines in the script editing window.

 

If so, there's a continuation character or string, I think the backslash,  but then when in long strings it's problematic because it gets treated like part of the string.  There's a way to do it IIRC, but since you can just concatenate long series of strings with the '+' symbol, it's probably just easier to do

System.MessageBox("Here are some words in my message " + \
      "and here are some more.  And finally, here are " + \
      "even more.")
Posted

Yeah, you can't put \ in a string.  Or I should say you can, but it will just be part of the string, it won't act as the continuation character.  In fact, when DAQFactory is doing the parsing, once it sees a " or ', it ignores all special meaning until the closing " or ' or an end of line character.  Well, there actually are exceptions, for example, if @ is the first character after the " or '.  @ is used for localization (see 7.12)

Archived

This topic is now archived and is closed to further replies.