AutoHotkey Community

It is currently May 27th, 2012, 12:28 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: June 15th, 2005, 4:21 pm 
Offline

Joined: June 9th, 2005, 4:20 pm
Posts: 21
In MsgBox help ..
Quote:

If Text is long, it can be broken up into several shorter lines by means of a continuation section, which might improve readability and maintainability.


I can see how to "split a long line into a series of shorter lines" by using breaks such as ||, &&, ... or just comma at beginning of lines.

But can multiline messages (in MsgBox) be created .. without displaying these break characters? i.e. just as word-wrapped text?

I know it can be done by running Notepad .. I prefer it to be in MsgBox for consistency with other user messages.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 15th, 2005, 4:38 pm 
Offline

Joined: July 29th, 2004, 4:44 pm
Posts: 13
Code:
msgbox, This is the first line,`nbut this is the second.`n`nThis is the second paragraph of text, but you have to check for wrapping length yourself.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 15th, 2005, 8:17 pm 
Offline

Joined: June 9th, 2005, 4:20 pm
Posts: 21
Thanks .. I understand (and already use) that MsgBox format ..
but it is not very friendly for text which extends over quite a number of lines ..

I have tried this I guess that true word wrap is not possible.

This works .. but ideally the commas would be suppressed (not printed)


test line1 `n
, test line2 `n
, test line3 `n
, test line4 `n
, test line5 `n
, test line6 `n
, test line7 `n


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 15th, 2005, 8:29 pm 
Offline

Joined: December 12th, 2004, 1:34 pm
Posts: 51
dragonfly, here's how it's done:

Code:
MsgBox,
( LTrim
    test line1
    test line2
    test line3
    test line4
    test line5
    test line6
    test line7
)


Take a look at the section "Splitting a Long Line into a Series of Shorter Ones" in the help file :
http://www.autohotkey.com/docs/Scripts.htm


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 15th, 2005, 11:17 pm 
Offline

Joined: June 9th, 2005, 4:20 pm
Posts: 21
Multiline MsgBox now working. Thank you.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 30th, 2005, 2:41 pm 
I also needed this, and as a note to anyone else who might be wondering, use "` " (` with a space) to put in spaces.


Report this post
Top
  
Reply with quote  
 Post subject: Better Than It
PostPosted: November 30th, 2005, 5:59 pm 
dragonfly wrote:
Multiline MsgBox now working. Thank you.


vbCrLf this command is better than it

msgbox "first line" & vbCrLf & "Second Line" & vbCrLf & "Third Line" & ..........


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], chaosad, Exabot [Bot], Google Feedfetcher, jrav, Yahoo [Bot] and 19 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group