Insert a random name into a field (using TypeText)

I am testing an application, and i need the system to create mock client records. I would like the system to enter a random name from a list. I have been trying for a day and a half to figure this out, but i am having NO luck.

I have a list of names, all i need is a script that either access the TXT file containing the names pulls one out at random, and enters it into my form, using the TypeText (or some similar) command.

Or I was also thinking it may be possible to create a script that contained a list of names, and have the script somehow pick one of the names at random, and then inserting it into the appropriate field with a TypeText (or similar) command.

I found something that sounded like what i would like to use int he “Useful Sensetalk Functions” thread, but i could not get it to work. (says No handler found for function message 'folder"… plus a couple of other errors.)
I have no idea what I am doing wrong.

I tried to modify that script in countless ways, but i just could not figure it out.


Thanks in advance!

put (Joe, Tom, Carry, Sams) into listOfNames
put Random(number of items in listOfNames) into randomInt
put item randomInt of listOfNames into randomName
TypeText randomName