I believe this had been done, I just added errors and made the script clear. the example is in the script, on top, just unblock the comment... you'll see it. GenerateRandomNoRepeat.au3