thanks for the info. Another question

Sarah Reichelt sarahr at genesearch.com.au
Wed Mar 9 22:25:33 EST 2005


> Hi thanks for all the usful info. Now I have just started to play
> around with revolution. What I was trying to do was when a user clicks
> a button(named askquestion) it would load a popup asking for the users
> name(Wich I figured out how to do (ask "What is your name?"). Now what
> i want to do is have the program answer the user with (answer "hello
> <user name>"). How would I write a script to do that.
>
The result of an "ask" is put into the variable called "it", so you can 
do this:

on mouseUp
   ask "What is your name?"
   put it into yourName
   if yourName is empty then
     -- either they clicked Cancel or they didn't enter anything
     answer "Not talking, eh?"
   else
     answer "Hello " & yourName
   end if
end mouseUp

HTH,
Sarah



More information about the use-livecode mailing list