Skip to content

Instantly share code, notes, and snippets.

@TLMcode
Last active December 17, 2015 15:40
Show Gist options
  • Save TLMcode/5633736 to your computer and use it in GitHub Desktop.
Save TLMcode/5633736 to your computer and use it in GitHub Desktop.
GenRndStr(), creates random strings from arrays
Array := ["a","b","c","d","e","f"]
MsgBox % GenRndStr( Array, 3 ) "," GenRndStr( Array, 3 ) "," GenRndStr( Array, 3 )
Return
GenRndStr( Array, Length ) {
For i in Array
{
String .= Array[i] ","
}
Sort, String, Random D`,
Return SubStr(RegExReplace(String,","),1,Length)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment