With the current code I made, I get five random letters between A-F but they can appear more than once. I don't want that.
When I press F2 I would like it to send," D E C B A " or " F A D C E " etc... and not, for example, " A C A D E " with "A" appearing twice. (A, B, C, .. F represent different words)
Is there a way to send 5 random letters between A-F without a single letter appearing more than once?
Code: Select all
F2::
arr1 :=["A ","B ","C ","D ","E ","F "]
arr2 :=["A ","B ","C ","D ","E ","F "]
arr3 :=["A ","B ","C ","D ","E ","F "]
arr4 :=["A ","B ","C ","D ","E ","F "]
arr5 :=["A ","B ","C ","D ","E ","F "]
Random, Rand1, 1, arr1.Count(6)
Random, Rand2, 1, arr2.Count(6)
Random, Rand3, 1, arr3.Count(6)
Random, Rand4, 1, arr4.Count(6)
Random, Rand5, 1, arr5.Count(6)
Send % arr1[rand1] "" arr2[rand2] arr3[rand3] arr4[rand4] arr5[rand5] "`n"
return