Hello,

I'm looking at writing a password generator that uses real words. In order to do this I've downloaded a relatively small dictionary text file, about 80K words (600kb), with a word-per-line.

Now, my problem is what is the best way to pick a word out of this file randomly, preferably with FSO?

Currently I count the number of lines in the file and use a random number generator to pick a number within the lines-of-file range. This is where I run into problems/issues. I can read each line into an array, and access the random element as required, but is this the best/most efficient way for such a large number of lines?

Thanks.