# Letter list generator...

## Recommended Posts

Ok, so for about an hour now i've been trying to figure out how to make a list of letters like this:

a

b

c

d

...

zzzzy

zzzzz

problem is, because the ascii codes of upper and lower case letters, and numbers are seperated, the code i've got won't work to create a list with all these...

can anyone find a solution to this...?

here's what i've got so far... (couldn't get lots of nested loops to work...):

```for \$l1 = 97 to 122
\$word = chr(\$l1)
ConsoleWrite(\$word&@CRLF)
next

for \$l2 = 97 to 122
for \$l1 = 97 to 122
\$word = chr(\$l2) & chr(\$l1)
ConsoleWrite(\$word&@CRLF)
next
next

for \$l3 = 97 to 122
for \$l2 = 97 to 122
for \$l1 = 97 to 122
\$word = chr(\$l3) & chr(\$l2) & chr(\$l1)
ConsoleWrite(\$word&@CRLF)
next
next
next

for \$l4 = 97 to 122
for \$l3 = 97 to 122
for \$l2 = 97 to 122
for \$l1 = 97 to 122
\$word = chr(\$l4) & chr(\$l3) & chr(\$l2) & chr(\$l1)
ConsoleWrite(\$word&@CRLF)
next
next
next
next

for \$l5 = 97 to 122
for \$l4 = 97 to 122
for \$l3 = 97 to 122
for \$l2 = 97 to 122
for \$l1 = 97 to 122
\$word = chr(\$l5) & chr(\$l4) & chr(\$l3) & chr(\$l2) & chr(\$l1)
ConsoleWrite(\$word&@CRLF)
next
next
next
next
next```
Edited by rabbitkillrun

##### Share on other sites

This has been asked a few times before:

http://www.autoitscript.com/forum/index.ph...amp;hl=generate

##### Share on other sites

thanks... i tried searching, but i couldn't think of the right search term...

although it still doesn't really help much with my problem with the gaps between the ascii characters...

##### Share on other sites

sorry for digging up this old topic to answer my own question, but thought it could be useful to another autoit newb in the future...

i just created an array containing all the characters i wanted and went through charList[\$i] rather than using char(\$i)...

i can't see how i managed to miss that before... i guess that's what late night programming does to you...

## Create an account

Register a new account

×

• Wiki

• Back

• Git