When you are creating that list in the same way like that every time it's easier if you do not actually save a list.
If you assign numbers to a combination of letters you can then turn the letter into a number and back.
To get the next entry -> turn into number -> add 1 -> turn the new number into a combination of letters:
In your case you could probably use something like:
Code: Select all
turnNumberIntoLetters(Nr, wordLength := 3) { ;starting with 0
Nr := mod(Nr, (26**wordLength))
out := ""
nrWordLenght := ceil(log(Nr) / log(26))
Loop % nrWordLength {
currentLetterNr := floor(Nr/(26**(nrWordLength-A_Index)))
Nr -= currentLetterNr * (26**(nrWordLength-A_Index))
out .= chr(97 + currentLetterNr)
}
return out
}
turnLettersIntoNumber(letters) {
Nr := 0
for each, letter in strSplit(letters) {
Nr := Nr*26 + ord(letter) - 97
}
Return Nr
}
untested