Correction: Sorry about the confusion I might have caused. I forgot to put one line in the sequence of message box commands: The first line is a simple declaration of the global you want to use:
global gVarToHoldString --now the rest should work put "the dog barks" into gVarToHoldString put gVarToHoldString put cr & word 1 of gVarToHoldString after msg put msg & cr & cr & gVarToHoldString & " loudly" Jim Ault Las Vegas On 3/12/08 10:54 AM, "Jim Ault" <[EMAIL PROTECTED]> wrote: > On 3/12/08 9:35 AM, "Colin Holgate" <[EMAIL PROTECTED]> 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. > > So: > --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 _______________________________________________ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution