Sign in to follow this  
Followers 0
lolkid

Split a long line into two lines?

5 posts in this topic

I would like to split oversized lines...

Msgbox(0, "An example", "Hello," & @CRLF & "I would like to split this line in half or more parts," & @CRLF & "because it is so long and" & @CRLF & "because it makes my script look so ugly :X")

like so...

Msgbox(0, "An example", "Hello," & @CRLF &
                        "I would like to split this line in half or more parts," & @CRLF &
                        "because it is so long and" & @CRLF &
                        "because it makes my script look so ugly :X")

What must I do?

Share this post


Link to post
Share on other sites



I would like to split oversized lines...

Msgbox(0, "An example", "Hello," & @CRLF & "I would like to split this line in half or more parts," & @CRLF & "because it is so long and" & @CRLF & "because it makes my script look so ugly :X")

like so...

Msgbox(0, "An example", "Hello," & @CRLF &
                        "I would like to split this line in half or more parts," & @CRLF &
                        "because it is so long and" & @CRLF &
                        "because it makes my script look so ugly :X")

What must I do?

There is a function called StringSplit($string,$delimit)

An example:

$days = StringSplit("Sun,Mon,Tue,Wed,Thu,Fri,Sat", ",")

MsgBox(0,"",$days[1]) <--- $days[1] = Sun, $days[2] = Mon

For your problem:

Msgbox(0, "An example", $array[1] & @CRLF & $array[2] & @CRLF & $array[3] & @CRLF & $array[4])

Share this post


Link to post
Share on other sites

I meant something like \ in Bash and not a string to array conversion... :)

Share this post


Link to post
Share on other sites

Simply use these symbols: _ (with a space before them)

Msgbox(0, "An example", "Hello," & @CRLF & _
                        "I would like to split this line in half or more parts," & @CRLF & _
                        "because it is so long and" & @CRLF & _
                        "because it makes my script look so ugly :X")

Another example:

GUICreate("blabla", _
50, 50 _
, -1, -1, _
)

this example is of course silly, but it should work. ^^


[font="Courier New"]http://RomanK.hondadesigns.com[/font]

Share this post


Link to post
Share on other sites

Simply use these symbols: _ (with a space before them)

Msgbox(0, "An example", "Hello," & @CRLF & _
                        "I would like to split this line in half or more parts," & @CRLF & _
                        "because it is so long and" & @CRLF & _
                        "because it makes my script look so ugly :X")

Another example:

GUICreate("blabla", _
50, 50 _
, -1, -1, _
)

this example is of course silly, but it should work. ^^

Thanks a lot, that's what I was looking for! :)

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0