Random Generators

Soz if this is not the correct place to post a question like this…

Firstly, I know nothing of programming or code.
I have 3 lists of activities (each with about 20 items, constantly updated).
I would like to create a program that can randomly select & display one activity from each list. A program that can run on Windows without external help. (in HTML?, DOS?, JAvascript with viewer?)

Can anyone in the forum help?
It sounds like it should be simple (if you know what you’re doing!)

Thanks…

A lot of programming languages have their own random number generators, but you do have to be careful. This example of Javascript primers can show you how, but notice that it uses the date function. Fraught with peril. On the other hand, if you try it, and it works for you, then that is an easy way to go. There is a javascript function called Math.random(), which will return a number between 0 and 1–you multiply it by the number of objects that you are trying to select from, and take Math.floor() of that product.

I guess we still can’t edit our posts. Welcome to the SDMB, Aro.

If you want to do cryptography, or Monte Carlo numerical simulations, then you’ll want to write your own random number generator, or use a published one known to be robust. If you’re just interested in an amusing little gizmo, then a built-in random number generator from any programming environment will probably suffice.

It looks, though, like the random number generator won’t be your biggest obstacle. If you don’t know anthing about programming, then your biggest challenge will be putting everything together. This is a bit of a bigger task than we can easily help you with on a message board. I would reccommend that you first find out what sort of programming facilities are available to you (you probably don’t want to have to go out and buy a compiler; many versions of Windows come with some sort of BASIC compiler), and then get an introductory book from the library on programming in that language.

Thanks for the help guys,

I was just looking for a simple method of extracting an item from a list. I wasn’t really concerned on the reliability of it being exactly random.

Ended up, I got Excel to perform the task with this command:

=VLOOKUP(RAND()*(16-1)+1,A1:B16,2)

(Spanning cells A1 to B16) 15 items in list.

Thanks…