Name generator AKA brute force algorithm?
Posted: 21 Oct 2018, 04:40
Can anyone help me with changing my code to work with any string length (defined by iNameLenght) without copy/pasting loop, parse section (and without using functions if possible - but not necessary)?
Code: Select all
;alfabet := "abcdefghijklmnopqrstuvwxyz0123456789"
alfabet := "abcdefghijklmnopqrstuvwxyz"
iNameLenght := 4
loop, parse, alfabet
{
l1 := A_LoopField
loop, parse, alfabet
{
l2 := A_LoopField
loop, parse, alfabet
{
l3 := A_LoopField
loop, parse, alfabet
{
l4 := A_LoopField
sName := l1 . l2 . l3 . l4 . ","
sAllNames := sAllNames . sName
}
}
}
}
MsgBox, %sAllNames%