Dazu hatte ich mal eine Funktion erstellt:
[autoit];==============================================================================
; Gibt eine Anzahl Zufallszahlen ohne Doppel als String oder Array zurück
; Bereich von - bis festlegbar (positiv Integer)
; mit -1 für Anzahl werden alle Zahlen des Bereichs in zufälliger Reihenfolge
; ausgegeben
;==============================================================================
Func _RandomExt($iBis, $iVon=1, $iAnzahl=-1, $array=0)
Local $count = $iBis -$iVon +1
If $iAnzahl = -1 Then $iAnzahl = $count
Local $aValue[$count], $start = $iVon, $sOut = '', $random
For $i = 0 To $count -1
$aValue[$i] = $start
$start += 1
Next
For $i = 0 To $iAnzahl -1
$random = Random(0, $count -1 -$i, 1)
$sOut &= $aValue[$random] & ','
$aValue[$random] = $aValue[$count -1 -$i]
Next
$sOut = StringTrimRight($sOut, 1)
If $array Then Return StringSplit($sOut, ',', 2)
Return $sOut
EndFunc ;==>_RandomExt