Sign in to follow this  
Followers 0
blckpythn

@CRLF within a string?

7 posts in this topic

I'm trying to create a GUI for Xcopy and FileRead wasn't working for my help text.

Sooo... What I'm trying to do is display a MsgBox with the text being $helptext.

While declarying this variable I'm trying to make it equal a string with @CRLF, is this possible?

Share this post


Link to post
Share on other sites



Global $helptext = "First line" & @CRLF & "Second line"

Just stick it in there with the append operator "&".

:idea:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

It is several lines and I would like to keep the indentation, will I have to put all the lines into one line for it to be included in $helptext

or should I make each line begin with $helptext &= " text" & @CRLF

Share this post


Link to post
Share on other sites

$helptext = "This is my help text." & @CRLF & _
    @TAB & "There are many like it, " & @CRLF & _
    @TAB & "but this one is mine!"
For $n = 1 To 10
    $helptext &= @CRLF & @TAB & @TAB & "Extra line: " & $n
Next
MsgBox(64, "Test", $helptext)

:idea:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Well this didn't work

Local $helptext = "XCOPY [source] [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W]" & @CRLF & _
"                           [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U]" & @CRLF & _
"                           [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z]" & @CRLF & _
"                           [/EXCLUDE:file1[+file2][+file3]...]" & @CRLF & _
MsgBox(0, "Xcopy GUI Help", $helptext)

Share this post


Link to post
Share on other sites

Because I'm a noob that's why.

And thank you that fixed the issue.

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