Option Explicit Main Sub Main Dim intMaxLength If WScript.Arguments.Count = 1 Then intMaxLength = WScript.Arguments(0) Else intMaxLength = InputBox("Enter desired word length (1-8)") End If If Not IsNumeric(intMaxLength) Then MsgBox "Pass a *NUMBER* from 1 to 8 for max word length of dictionary" Exit Sub End If If intMaxLength < 1 Or intMaxLength > 8 Then MsgBox "Pass a number *FROM 1 TO 8* for max word length of dictionary" Exit Sub End If CreateList CInt(intMaxLength) End Sub Sub CreateList(intMaxLength) Const ForWriting = 2 Const ForAppending = 8 Dim fs, ts, arrLetters, strWord, a1, a2, a3, a4, a5, a6, a7, a8 Set fs = CreateObject("Scripting.FileSystemObject") Set ts = fs.OpenTextFile(FileNameLikeMine("txt"), ForWriting, True) arrLetters = Array("", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", " ", "~", "`", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "-", "+", "=", "|", "\", "{", "[", "}", "]", ":", ";", "'", """", "<", ",", ">", ".", "?", "/") For Each a1 In arrLetters For Each a2 In arrLetters For Each a3 In arrLetters For Each a4 In arrLetters For Each a5 In arrLetters 'Status and length tested here (instead of after a8) for speed Status strWord If Len(strWord) > intMaxLength Then ts.Close Exit Sub End If For Each a6 In arrLetters For Each a7 In arrLetters For Each a8 In arrLetters strWord = a1 & a2 & a3 & a4 & a5 & a6 & a7 & a8 ts.WriteLine strWord Next Next Next Next Next Next Next Next ts.Close End Sub Function FileNameLikeMine(strFileExtension) 'As String 'Returns a file name the same as the script name except 'for the file extension. Dim fs 'As Object Dim strExtension 'As String Set fs = CreateObject("Scripting.FileSystemObject") strExtension = strFileExtension If Len(strExtension) < 1 Then strExtension = "txt" If strExtension = "." Then strExtension = "txt" If Left(strExtension,1) = "." Then strExtension = Mid(strExtension, 2) FileNameLikeMine = Left(Wscript.ScriptFullName, InstrRev(Wscript.ScriptFullName, ".")) & strExtension End Function Sub Status(strMessage) If Lcase(Right(Wscript.FullName, 12)) = "\cscript.exe" Then Wscript.Echo strMessage End If End Sub