Multiple Line Output in the Message Box

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
lupuss
Posts: 25
Joined: Sat Nov 27, 2010 10:24 am

Multiple Line Output in the Message Box

Post by lupuss » Tue Dec 21, 2010 3:29 pm

With the following code
on mouseup
put clickLine ()
put char 6 of the clickline
end mouseup
I tried to get 2 seperate lines of output in the message box (equivalent to what a message window in Lingo used to do), but there is no automatic CR at the end of the first output and the line gets overwritten by the 2nd put statement. I could not find anything in the dictionary, so tried adding return or put return or &return, but nothing worked. Does anyone know the correct procedure?

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Multiple Line Output in the Message Box

Post by Klaus » Tue Dec 21, 2010 4:12 pm

Hi lupuss (the wolff :-))

you need to prepare the output to be two lines:

Code: Select all

on mouseup
  put clickLine() & CR & char 6 of the clickline
end mouseup
Best

Klaus

lupuss
Posts: 25
Joined: Sat Nov 27, 2010 10:24 am

Re: Multiple Line Output in the Message Box

Post by lupuss » Tue Dec 21, 2010 4:49 pm

you need to prepare the output to be two lines:

Code: Select all

on mouseup
  put clickLine() & CR & char 6 of the clickline
end mouseup
Sorry, I cannot have the two outputs in the same line. They need to be in separated lines, because there are operations in between by which I will output char 6 of the clickline only under certain conditions

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Multiple Line Output in the Message Box

Post by Klaus » Tue Dec 21, 2010 4:59 pm

Ah, now I get it (hopefully)!
You can:

Code: Select all

on mouseup
   put clickLine () 
   put CR & char 6 of the clickline AFTER msg
end mouseup
But remember that the message box is a developer tool and can, but shouldn't!, be added to a standalone 8)

Best

Klaus

lupuss
Posts: 25
Joined: Sat Nov 27, 2010 10:24 am

Re: Multiple Line Output in the Message Box

Post by lupuss » Tue Dec 21, 2010 5:21 pm

that's it - thanx a lot! (the ... after msg - thing is really tricky)

Post Reply