newbie level question

Jim Ault JimAultWins at
Wed Mar 12 14:54:15 EDT 2008

On 3/12/08 9:35 AM, "Colin Holgate" <coiin at> wrote:

> Oh, this will make you all laugh no doubt, but how do I use variables
> in the message box? For example, if I try this:
> get 10
> put it
> the word "it" is put into the message box. What would I do
> differently in order to see the value "10" appear?

Mark's answer is a good one.
The 'it' container is a special one for Rev, so you need to learn how it
works, usually by testing to make sure what happens is what you want.

Another way to use variables is to create a global in the message box, then
use that global :

put "the dog barks" into gVarToHoldString

Now Revolution program stores the string in a variable that will persist
until you quit Rev.  Opening and closing stacks will not affect this value
unless they also access the 'aaaa' global.

--run each of these in the msg box to test the effect

put "the dog barks" into gVarToHoldString
put gVarToHoldString
put cr & word 1 of gVarToHoldString after msg
put msg & cr & cr & gVarToHoldString & " loudly"

Caution when using the multi-line message box as there are slight
differences from running the same code in a script container, such as the
stack script.

Jim Ault
Las Vegas

More information about the Use-livecode mailing list