Try This...

The first function enumerates all the lines of a text file into an array. I then use the random function to get a number between 0 and the highest element of the array. I then display this line number in a messagebox.

Code:
$Lines = ArrayEnumText("C:\test.txt") ; Change This To Your Text File
$LineNumber = Random(0,UBound($Lines))
$null = messagebox ($Lines[$LineNumber],"",0)

FUNCTION ArrayEnumText($TextFile)
Dim $TextHandle,$Line,$LineArray,$LineValue
$TextHandle = FreeFileHandle()
$LineValue = 0
If Open ($TextHandle,$TextFile) = 0
$Line = ReadLine ($TextHandle)
While @Error = 0
ReDim Preserve $ArrayEnumText[$LineValue]
$ArrayEnumText[$LineValue] = $Line
$Line = ReadLine ($TextHandle)
$LineValue = $LineValue+1
Loop
$null = Close ($TextHandle)
If UBound ($ArrayEnumText) >= 0
Exit 0
Else
Exit 1
Endif
Else
Exit 1
Endif
ENDFUNCTION

FUNCTION random($min, $max, optional $seed)
DIM $i, $burn, $nul
srnd((-1)*@ticks*(val($seed)+1))
$burn = rnd(50)
for $i = 1 to $burn
$nul = rnd($max)
next
$random = rnd($max)
while $random < $min or $random > $max
$random = rnd($max)
loop
ENDFUNCTION