Page 1 of 1

Multiple Line Output in the Message Box

Posted: Tue Dec 21, 2010 3:29 pm
by lupuss
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?

Re: Multiple Line Output in the Message Box

Posted: Tue Dec 21, 2010 4:12 pm
by Klaus
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

Re: Multiple Line Output in the Message Box

Posted: Tue Dec 21, 2010 4:49 pm
by lupuss
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

Re: Multiple Line Output in the Message Box

Posted: Tue Dec 21, 2010 4:59 pm
by Klaus
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

Re: Multiple Line Output in the Message Box

Posted: Tue Dec 21, 2010 5:21 pm
by lupuss
that's it - thanx a lot! (the ... after msg - thing is really tricky)