For the names selection you could do something like this, as long as they're stored in a file with 1 name per line.
Code:
NumberOfNames = 3 ;Number of names to choose
InputFile = Names.txt ;Name of the file where names are stored
OutputFile = Chosen.txt ;Name of the file where chosen names are stored
; This loop finds out how many names are in the file,
; if you don't need to do this, just replace this whole
; section with:
; TotalNames = # of names
Loop
{
FileReadLine, TestSize, %InputFile%, %A_Index%
If ErrorLevel
{
TotalNames := A_Index-1
break
}
}
; Chooses the names, and writes them to %OutputFile%
UsedNames =
Loop, %NumberOfNames%
{
StringSplit, UsedNames, UsedNames, |
Loop
{
LineNum =
NewName =
Random, LineNum, 1, %TotalNames%
FileReadLine, NewName, %InputFile%, %LineNum%
Loop, %UsedNames0%
{
If (UsedNames%A_Index% = NewName)
Continue
}
Break
}
UsedNames = %UsedNames%|%NewName%
FileAppend, %NewName%, %OutputFile%
}