Function Reference
RandomLetter
Generates a pseudo-random letter
RandomLetter ( [ Mode = 0 [, Uppercase = 0 [, Repeat = 0]]] )
Parameters
Mode
[optional] The pseudo-random mode for generation
0 = (default) Generate the full alphabet
1 = Generate only vowels
2 = Generate only consonants
Uppercase
[optional] Determine if the result will be in lower or uppercase
0 = (default) Return the result in lowercase
1 = Return the result in uppercase
Repeat [optional] The time to repeat the loop in addition of 1. See remarks for more informations
Return Value
Success: a pseudo-random character
Failure: 0 and @error flag set as follows:
@error: 1 - The Mode setting must be between 0 and 2
2 - The Uppercase setting must be 0 or 1
3 – The Repeat setting must be a positive number
Remarks
If no arguments are provided, then it will return one pseudo-random character in lowercase.
The parameter Repeat add X more turns to the loop. So by default, the loop will do one turn.
Example
#include "RandomLetter.au3"
#include <MsgBoxConstants.au3>
; Two consonants characters in uppercase.
Example()
Func Example()
MsgBox($MB_SYSTEMMODAL, "", _
"Here are two pseudo-random consonants uppercase characters :"& _
RandomLetter( 2, 1, 1) )
EndFunc