Advertisement
Guest User

Untitled

a guest
Sep 28th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. $File = FileReadToArray("words.txt")
  2. $RandomWords = $File[Random(0, UBound($File) - 1, 1)]
  3.  
  4. send ("$RandomWords")
  5. sleep (1000)
  6. send ("{enter}")
  7.  
  8. $words_file = "words.txt";
  9.  
  10. $word_pool = file($words_file); // an array with one line of words.txt for each Key
  11. $rand1 = gmp_random_range(1, 50) // for 50 lines at 10pt type
  12. $rand2 = gmp_random_range(1, 25) // approx 25 words per line
  13. // Now choose a random $line # for the $key
  14. $RandomLineofWords = $words_pool[$rand1]; $RandomWordLineArray = explode(' ',$RandomLineofWords); // split line of words into an array based on space separator
  15. $random_word = $RandomWordLineArray[$rand2]
  16. //sending is more involved
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement