Random Name Generator

Ken Ray kray at sonsothunder.com
Wed Dec 29 16:53:54 EST 2004


On 12/29/04 2:20 PM, "Robert Sabo" <viper4559 at yahoo.com> wrote:

> Hey Everyone,
>  
> I just joined this group. Seems pretty cool.

Hey, Robert... welcome!

> Well here's my problem. I am trying to make a program that will allow you to
> input however many names you want into a list. This list will be on the bottom
> section where you can delete users. The middle section will contain a text
> area for you to input another username and the top level will run the program.
> This program is going to be setup to randomly output a name from the list. I
> got my layout already made, however I am having problems finding good help on
> how to script what I want to do with the username list.

Suppose you had a list field called "User Names" which will contain the list
of user names, and a separate field called "Selected User" which will
contain the name of the randomly selected user name from the "User Names"
field. Add to this a button that says "Go", and you have this:

-- Script of button "Go"
on mouseUp
  put any line of field "User Names" into field "Selected User"
end mouseUp

Easy, no?

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list