How to use "answer" to get user info like name? - Solved

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
DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

How to use "answer" to get user info like name? - Solved

Post by DR White » Sat Nov 30, 2013 2:35 pm

How can I use "answer" command to get user info like their name?

Only responses I see for "answer" command, is for user to click on a button. I need user to be able to type a little text.

Is it possible?

Thanks,

David
Last edited by DR White on Sat Nov 30, 2013 3:43 pm, edited 1 time in total.

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

Re: How use "answer" to get user info like name?

Post by Klaus » Sat Nov 30, 2013 2:41 pm

Hi David,

just "ask" the user :D

Code: Select all

...
ask "What is your name?"
put it into tName

## User cancelled or did not type anything
if tName = empty then
  exit to top
end if
## Now do whatever you like with tName
...
Best

Klaus

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: How use "answer" to get user info like name?

Post by DR White » Sat Nov 30, 2013 3:05 pm

Klaus,

That works perfectly! :)

I was embarrassed to ask such a simple question, but when I went to the dictionary, all it referred to was user clicking on buttons.

You have really been a tremendous help in my learning to use LC!

Thanks,

David

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

Re: How use "answer" to get user info like name?

Post by Klaus » Sat Nov 30, 2013 3:23 pm

Hi David,
DR White wrote:You have really been a tremendous help in my learning to use LC!
I learned Livecode (its grandpa Metacard) the hard way without internet access in 1999,
so I could not ask anybody, just with TRY and ERROR 8)

So I know the VERY steep learning curve of Livecode and like to help wherever I can :D


Best

Klaus

Post Reply