## (Scrabble) Standalone Anagram Solver N/4-15___v1.07 + Function

Post gaming related scripts
littlegandhi1199
Posts: 194
Joined: 29 Aug 2016, 23:58

### (Scrabble) Standalone Anagram Solver N/4-15___v1.07 + Function

IF YOU JUST WANT THE FUNCTION it's here
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=77954&p=338947#p338947

At first, all possible combinations of an 11 letter word would give you 39.9 million words and that many queries into the dictionary.

That is until Helgef realized you can simply sort all the letters in your word alphabetically and then all entries under that same unique string in your dictionary are anagrams!
tea becomes eat
ate becomes eat
eat stays eat
you type in "tae" and it becomes eat and it will dump all anagrams with ONE QUERY!

Now, I had already built my script to generate permutations using again 11 letters taken at simple sizes of 4(3 or less is too boring 5 6 up to 13.
His method wouldn't work or save you any time for any other length because you need all 11 letters accounted for with every other letter at least once in your 4 letter word queries.
To guarantee that, I thought I'd need all 87 billion queries for 13 letter words from a 14 letter input.
I like to mash my keyboard too to find words I'd be surprised were waiting in the soup of characters and when I put 15 letters in we're already talking 653 billion.

I examined the permutation outputs from "abcdef" and found that it started in regular order and ended in exactly reverse order which looks the same when we query the dictionary.
This is when I realized I needed to find the pattern that had to stop (I imagined) halfway through the queries.

*********************************************
So the pattern I discovered...
Spoiler
Script
*********************************************
http://wordlist.aspell.net/12dicts/
The 12dicts lists are oriented towards common words. If you're looking for myriads of archaic, scientific or computer jargon words, you should look elsewhere.
Here's another list of words that I like
https://github.com/dwyl/english-words
I combine all the American dictionaries from their website into "words.txt" which should be located in %A_ScriptDir%

v1.01 - Cleaned up code. Bugs reported and will be addressed in time
v1.02 - Made perfect wasteless permutation query loops (duplicates are never created and don't have to be queried) now 653bil=105
v1.03 - Culled some unnecessary code from script and combined my two scripts into one
v1.04 - Saved 1100ms from every solve and placed it at beginning of script load instead
v1.05 - Cleaned up presentation of anagrams
+++Added built-in definition button will work on text in the input field without interrupting any running anagram solves

6/28/20
v1.06 - Finally noticed the bug myself of previous input bleeding into following inputs.
v1.07 - more bugfixes

v1.07

Code: Select all

``````#MaxMem 4196
Process, Priority, , H
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ^^ Up to you
;;V1.05
If A_IsCompiled != 1
Menu, Tray, Icon, C:\Program Files\AutoHotkey\AutoHotkey.exe, 2
#NoEnv
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
ListLines Off
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
SendMode Input
Gui, Add, Tab2,, 4 letters|5 letters|6 letters|7 letters|8 letters|9 letters|10 letters|11 letters|12 letters|13 letters|14 letters|15 letters
gui, font, s16
Gui, Add, Edit, vMyEdit1 r7  ; r5 means 5 rows tall.
Gui, Tab, 2
Gui, Add, Edit, vMyEdit2 r7  ; r5 means 5 rows tall.
Gui, Tab, 3
Gui, Add, Edit, vMyEdit3 r7  ; r5 means 5 rows tall.
Gui, Tab, 4
Gui, Add, Edit, vMyEdit4 r7  ; r5 means 5 rows tall.
Gui, Tab, 5
Gui, Add, Edit, vMyEdit5 r7  ; r5 means 5 rows tall.
Gui, Tab, 6
Gui, Add, Edit, vMyEdit6 r7  ; r5 means 5 rows tall.
Gui, Tab, 7
Gui, Add, Edit, vMyEdit7 r7  ; r5 means 5 rows tall.
Gui, Tab, 8
Gui, Add, Edit, vMyEdit8 r7  ; r5 means 5 rows tall.
Gui, Tab, 9
Gui, Add, Edit, vMyEdit9 r7  ; r5 means 5 rows tall.
Gui, Tab, 10
Gui, Add, Edit, vMyEdit10 r7  ; r5 means 5 rows tall.
Gui, Tab, 11
Gui, Add, Edit, vMyEdit11 r7  ; r5 means 5 rows tall.
Gui, Tab, 12
Gui, Add, Edit, vMyEdit12 r7  ; r5 means 5 rows tall.

Gui, Tab  ; i.e. subsequently-added controls will not belong to the tab control.
gui, font, s10
Gui, Add, Edit, vFirstName ym  ; The ym option starts a new column of controls.
gui, font, s7
Gui, Add, Button, default, Define
Gui, Add, Button, default, OK
gui, font, s10
Gui, Add, Edit, vMyEditDef r9  ; r5 means 5 rows tall.
FileRead, Bin, words.txt
Sort, Bin, U
Stringlower, Bin, Bin
dict:=[]
Loop, Parse, Bin, `n
{
maxindexzz := A_Index
stringtrimright, field, A_LoopField, 1
newparse =
loop, parse, field
newparse = %newparse%`n%A_loopfield%
sort, newparse
newparse := StrReplace(newparse, "`n", "")
if ObjHasKey(dict, newparse)
{
conten := dict[newparse]
conten = %conten%,%field%
dict[newparse] := conten
}
else
dict[newparse] := field
}
sometzzzz := StrLen(maxindexzz)
sometzzzz /= 3
sometzzzz := Floor(sometzzzz)
loop
{
if (A_Index > sometzzzz)
{
if (StrLen(maxindexzz) > 0)
lovesmax = %maxindexzz%,%lovesmax%
break
}
stringtrimleft, maxindexzze, maxindexzz, % StrLen(maxindexzz)-3
stringtrimright, maxindexzz, maxindexzz, 3
lovesmax = %maxindexzze%,%lovesmax%
}
stringtrimright, lovesmax, lovesmax, 1
GuiControl,, MyEditDef, Pulling from list of %lovesmax% unique words
Gui, Show,, Anagram Solver by Littlegandhi1199
return

GuiClose:
exitapp

ButtonDefine:
Gui, Submit
Gui, Show
FileDelete, tempish.txt
UrlDownloadToFile, https://www.google.com/search?q=define+%FirstName%&ie=utf-8&oe=utf-8, tempish.txt
If Errorlevel
msgbox, fail to download definition
else
FileRead, Sim, tempish.txt
Pos := InStr(Sim,"cached")
stringtrimleft, Sim, Sim, % Pos+5
Pos := InStr(Sim,"</span>")
stringtrimright, Sim, Sim, % StrLen(Sim)-Pos+1
loop
{
Pos := InStr(Sim,"<")
if (pos > 0)
stringtrimright, temp1, Sim, % StrLen(Sim)-Pos+1
else
break
Pos := InStr(Sim,">")
if (pos > 0)
stringtrimleft, temp2, Sim, %Pos%
sim = %temp1%%temp2%
}
GuiControl,, MyEditDef, %sim%
return

ButtonOK:
let := 1
stop = 1
add := 0
Array =
Array := Object()

Gui, Submit  ; Save the input from the user to each control's associated variable.
;;msgbox, submited OK with %FirstName%
if (last = FirstName)
{
stop = 1
Gui, Show
MsgBox, ,, SEARCH STOPPED, 1
return
}
else
{
loop, 15
GuiControl,, MyEdit%A_Index%, ...
stop = 0
}
last = %FirstName%
Gui, Show
input = %FirstName%
loop
{
stringtrimright, zinput, input, % StrLen(input)-1
stringtrimleft, input, input, 1
cont := zinput
if (cont = "")
break
Array[A_Index] := zinput
}

revpr := A_TickCount
yes := strlen(FirstName)
bet := yes-4
SendMessage, 0x1330, %bet%,, SysTabControl321
bet++
var = %FirstName%
newpar =
newparse =
loop, parse, var
newparse = %newparse%`n%A_loopfield%
sort, newparse
newparse := StrReplace(newparse, "`n", "")

;;msgbox, Checking flat out "%newparse%"

newpar = %newpar%`n%newparse%
if ObjHasKey(dict, newparse)
{
cont := dict[newparse]
cont := StrReplace(cont, ",", "`n")
var2 = %var2%`n%cont%
;;msgbox, Direct anagram "%var2%"
}
Fix = `n%FirstName%
var2 := StrReplace(var2, Fix)
if (var2 != "")
var2 = `n%var2%
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
GuiControl,, MyEdit%bet%, 0 anagrams`n%tempvar%
else
GuiControl,, MyEdit%bet%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%bet%.txt
newpar =
loop, 15
{
bet++
GuiControl,, MyEdit%bet%, longer then input`n%tempvar%
}
;;;;;;;;;;;;;;;;;;;;;;;;;; 4
skip := Array.MaxIndex()
let1 := let+2
skip -= let1
;;msgbox, let=[%let%]`nlet1=[%let1%]`nskip=[%skip%]`n...on first 4 legnth run
loop, % Array.MaxIndex()
{
if (A_Index > skip)
break
Entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
continue
c := Array[A_Index]
entry[3] := A_Index
z = %a%%b%%c%
let := 1
gosub themaster
if stop = 1
return
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
return
;;;;;;;;;;;;;;;;;;;;;;;;;; 5
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
continue
d := Array[A_Index]
entry[4] := A_Index
z = %a%%b%%c%%d%
let := 2
gosub themaster
if stop = 1
return
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
return
;;;;;;;;;;;;;;;;;;;;;;;;;; 6
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
continue
e := Array[A_Index]
entry[5] := A_Index
z = %a%%b%%c%%d%%e%
let := 3
gosub themaster
if stop = 1
return
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
return
;;dif := A_TickCount-revpr
;;msgbox, %dif%ms to complete
;;;;;;;;;;;;;;;;;;;;;;;;;; 7
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
continue
e := Array[A_Index]
entry[5] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index))
continue
f := Array[A_Index]
entry[6] := A_Index
z = %a%%b%%c%%d%%e%%f%
let := 4
gosub themaster
if stop = 1
return
}
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
return
;;;;;;;;;;;;;;;;;;;;;;;;;; 8
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
continue
e := Array[A_Index]
entry[5] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index))
continue
f := Array[A_Index]
entry[6] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index))
continue
g := Array[A_Index]
entry[7] := A_Index
z = %a%%b%%c%%d%%e%%f%%g%
let := 5
gosub themaster
if stop = 1
return
}
}
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
return
;;;;;;;;;;;;;;;;;;;;;;;;;; 9
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
continue
e := Array[A_Index]
entry[5] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index))
continue
f := Array[A_Index]
entry[6] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index))
continue
g := Array[A_Index]
entry[7] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index))
continue
h := Array[A_Index]
entry[8] := A_Index
z = %a%%b%%c%%d%%e%%f%%g%%h%
let := 6
gosub themaster
if stop = 1
return
}
}
}
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
return
;;;;;;;;;;;;;;;;;;;;;;;;;; 10
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
continue
e := Array[A_Index]
entry[5] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index))
continue
f := Array[A_Index]
entry[6] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index))
continue
g := Array[A_Index]
entry[7] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index))
continue
h := Array[A_Index]
entry[8] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index))
continue
i := Array[A_Index]
entry[9] := A_Index
z = %a%%b%%c%%d%%e%%f%%g%%h%%i%
let := 7
gosub themaster
if stop = 1
return
}
}
}
}
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
;;dif := A_TickCount-revpr
;;msgbox, %dif%ms to complete
if (bet > strLen(FirstName))
return
;;;;;;;;;;;;;;;;;;;;;;;;;; 11
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
continue
e := Array[A_Index]
entry[5] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index))
continue
f := Array[A_Index]
entry[6] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index))
continue
g := Array[A_Index]
entry[7] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index))
continue
h := Array[A_Index]
entry[8] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index))
continue
i := Array[A_Index]
entry[9] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index))
continue
j := Array[A_Index]
entry[10] := A_Index
z = %a%%b%%c%%d%%e%%f%%g%%h%%i%%j%
let := 8
gosub themaster
if stop = 1
return
}
}
}
}
}
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
return
;;;;;;;;;;;;;;;;;;;;;;;;;; 12
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
continue
e := Array[A_Index]
entry[5] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index))
continue
f := Array[A_Index]
entry[6] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index))
continue
g := Array[A_Index]
entry[7] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index))
continue
h := Array[A_Index]
entry[8] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index))
continue
i := Array[A_Index]
entry[9] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index))
continue
j := Array[A_Index]
entry[10] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index))
continue
k := Array[A_Index]
entry[11] := A_Index
z = %a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%
let := 9
gosub themaster
if stop = 1
return
}
}
}
}
}
}
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
return
;;;;;;;;;;;;;;;;;;;;;;;;;; 13
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
continue
e := Array[A_Index]
entry[5] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index))
continue
f := Array[A_Index]
entry[6] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index))
continue
g := Array[A_Index]
entry[7] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index))
continue
h := Array[A_Index]
entry[8] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index))
continue
i := Array[A_Index]
entry[9] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index))
continue
j := Array[A_Index]
entry[10] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index))
continue
k := Array[A_Index]
entry[11] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index) || (entry[11] >= A_Index))
continue
l := Array[A_Index]
entry[12] := A_Index
z = %a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%%l%
let := 10
gosub themaster
if stop = 1
return
}
}
}
}
}
}
}
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
return
;;;;;;;;;;;;;;;;;;;;;;;;;; 14
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
continue
e := Array[A_Index]
entry[5] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index))
continue
f := Array[A_Index]
entry[6] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index))
continue
g := Array[A_Index]
entry[7] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index))
continue
h := Array[A_Index]
entry[8] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index))
continue
i := Array[A_Index]
entry[9] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index))
continue
j := Array[A_Index]
entry[10] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index))
continue
k := Array[A_Index]
entry[11] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index) || (entry[11] >= A_Index))
continue
l := Array[A_Index]
entry[12] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index) || (entry[11] >= A_Index) || (entry[12] >= A_Index))
continue
m := Array[A_Index]
entry[13] := A_Index
z = %a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%%l%%m%
let := 11
gosub themaster
if stop = 1
return
}
}
}
}
}
}
}
}
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
return
;;;;;;;;;;;;;;;;;;;;;;;;;; 15
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
continue
e := Array[A_Index]
entry[5] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index))
continue
f := Array[A_Index]
entry[6] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index))
continue
g := Array[A_Index]
entry[7] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index))
continue
h := Array[A_Index]
entry[8] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index))
continue
i := Array[A_Index]
entry[9] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index))
continue
j := Array[A_Index]
entry[10] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index))
continue
k := Array[A_Index]
entry[11] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index) || (entry[11] >= A_Index))
continue
l := Array[A_Index]
entry[12] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index) || (entry[11] >= A_Index) || (entry[12] >= A_Index))
continue
m := Array[A_Index]
entry[13] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index) || (entry[11] >= A_Index) || (entry[12] >= A_Index) || (entry[13] >= A_Index))
continue
n := Array[A_Index]
entry[14] := A_Index
z = %a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%%l%%m%%n%
let := 12
gosub themaster
if stop = 1
return
}
}
}
}
}
}
}
}
}
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =

return
;;;;;;ButtonOK complete?

themaster:
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index) || (entry[11] >= A_Index) || (entry[12] >= A_Index) || (entry[13] >= A_Index) || (entry[14] >= A_Index) || (entry[15] >= A_Index))
continue
what := Array[A_Index]
var = %z%%what%

newparse =
loop, parse, var
newparse = %newparse%`n%A_loopfield%
sort, newparse
newparse := StrReplace(newparse, "`n", "")

;;newpar = %newpar%`n%newparse%
if ObjHasKey(dict, newparse)
{
cont := dict[newparse]
cont := StrReplace(cont, ",", "`n")
var2 = %var2%`n%cont%
}
}
return
``````
Last edited by littlegandhi1199 on 29 Jun 2020, 15:44, edited 28 times in total.
Script Backups on every Execution
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=75767&p=328155#p328155

Scrabble Solver 4-15 letter word outputs ( # of inputs)
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=34285
Helgef
Posts: 4693
Joined: 17 Jul 2016, 01:02
Contact:

### Re: (Scrabble) Anagram Solver N/4-15

Interesting post. Your script looks nice but sometimes anagrams disappear from the edit field, and sometimes the result from one query seems to be mixed with an earlier one. Searching for soup, also listed soap at one point, I had searched for something with an a before I think. Using code tags would be nice.

Thanks for sharing.

Cheers.
littlegandhi1199
Posts: 194
Joined: 29 Aug 2016, 23:58

### Re: (Scrabble) Anagram Solver N/4-15

Helgef wrote:Interesting post. Your script looks nice but sometimes anagrams disappear from the edit field, and sometimes the result from one query seems to be mixed with an earlier one. Searching for soup, also listed soap at one point, I had searched for something with an a before I think. Using code tags would be nice.

Thanks for sharing.

Cheers.
Yeah I just spent a day and a half figuring out how to make it only generate holey unique permutations and nothing else...
It has to do with the buttons telling the main loop to return to the function to restart a new search though I'm sure.
I know it works at-least once per boot.
Script Backups on every Execution
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=75767&p=328155#p328155

Scrabble Solver 4-15 letter word outputs ( # of inputs)
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=34285
littlegandhi1199
Posts: 194
Joined: 29 Aug 2016, 23:58

### Re: (Scrabble) Anagram Solver N/4-15

littlegandhi1199 wrote:
Helgef wrote:Interesting post. Your script looks nice but sometimes anagrams disappear from the edit field, and sometimes the result from one query seems to be mixed with an earlier one. Searching for soup, also listed soap at one point, I had searched for something with an a before I think. Using code tags would be nice.

Thanks for sharing.

Cheers.
Yeah I just spent a day and a half figuring out how to make it only generate holey unique permutations and nothing else...
It has to do with the buttons telling the main loop to return to the function to restart a new search though I'm sure.
I know it works at-least once per boot.
Wait I remember why I left that alone. I put a msgbox on everytime you hit the ok button and it doesn't always register that input. Are you sure it's really mixed two together?
Script Backups on every Execution
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=75767&p=328155#p328155

Scrabble Solver 4-15 letter word outputs ( # of inputs)
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=34285
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

### Re: (Scrabble) Anagram Solver N/4-15___v1.01

I have tried your script version 1.01. BTW, thanks for sharing
I copied len#.txt files from zip.zip. (your earlier version containing an exe file)

I entered "countdown" - all good.
Next I entered "letters" - and I get "enters" as a possible 6-letters solution. All the 6-letters solutions are:

Code: Select all

``````21 anagrams!

enters
letter
nestle
nettle
newels
newest
relent
renews
resent
resewn
retest
setter
settle
street
strewn
tenets
tenser
tester
tweets
welter
wetter``````
Keep up the good work! Your script is very fast and uses little memory, impressive!

Edit: That might be the same problem reported again, sorry. But I post anyway to get notifications of new posts here.
littlegandhi1199
Posts: 194
Joined: 29 Aug 2016, 23:58

### Re: (Scrabble) Anagram Solver N/4-15___v1.01

wolf_II wrote:I have tried your script version 1.01. BTW, thanks for sharing
I copied len#.txt files from zip.zip. (your earlier version containing an exe file)

I entered "countdown" - all good.
Next I entered "letters" - and I get "enters" as a possible 6-letters solution. All the 6-letters solutions are:

Code: Select all

``````21 anagrams!

enters
letter
nestle
nettle
newels
newest
relent
renews
resent
resewn
retest
setter
settle
street
strewn
tenets
tenser
tester
tweets
welter
wetter``````
Keep up the good work! Your script is very fast and uses little memory, impressive!

Edit: That might be the same problem reported again, sorry. But I post anyway to get notifications of new posts here.
Thank you!
Truly, 653billion is down to 105 now and not one more. I really hit the jackpot when I implemented the new scheme because there are no alphabetical repeats now and it doesn't have to check any previous loops (which would put the number of queries back up to 653 billion). I'll bet the memory has to do with that but also just because I split mine up into 15 parts too
Script Backups on every Execution
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=75767&p=328155#p328155

Scrabble Solver 4-15 letter word outputs ( # of inputs)
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=34285
littlegandhi1199
Posts: 194
Joined: 29 Aug 2016, 23:58

### Re: (Scrabble) Standalone Anagram Solver N/4-15___v1.05

Finally patched that input bleed that occured when going from a longer word to a shorter one.
V1.06

Also found a better english dictionary with almost 400k words too (no strange punctuation allowed!)
https://github.com/dwyl/english-words

Gonna be making a fun little anagram addon for family Scattegories game nights.
Let me know if anyone is interested when I'm finished.
Script Backups on every Execution
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=75767&p=328155#p328155

Scrabble Solver 4-15 letter word outputs ( # of inputs)
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=34285
rommmcek
Posts: 1442
Joined: 15 Aug 2014, 15:18

### Re: (Scrabble) Standalone Anagram Solver N/4-15___v1.07 + Function

I finde it fascinating how did you achive your goal!
However I had to modify your script to work on my OS/Ahk version. I think my version is more universal, however I'm amateur too!
Since combination method (despite your awesome cut downs) has hard time for langer inputs I introduced Stop Search via Esc hotkey. Besides loading a big words.txt file was pretty slow, I made subsequent loads faster:
Spoiler
P.s.: Here is my Anagram Cracker using RegEx. It can't cope with your Anagram Solver in terms of speed for short input words, but above ca. 15 characters becomes much faster.
littlegandhi1199
Posts: 194
Joined: 29 Aug 2016, 23:58

### Re: (Scrabble) Standalone Anagram Solver N/4-15___v1.07 + Function

rommmcek wrote:
19 Oct 2020, 22:31
I finde it fascinating how did you achive your goal!
However I had to modify your script to work on my OS/Ahk version. I think my version is more universal, however I'm amateur too!
Since combination method (despite your awesome cut downs) has hard time for langer inputs I introduced Stop Search via Esc hotkey. Besides loading a big words.txt file was pretty slow, I made subsequent loads faster:

P.s.: Here is my Anagram Cracker using RegEx. It can't cope with your Anagram Solver in terms of speed for short input words, but above ca. 15 characters becomes much faster.

Awesome! REGEX is amazing and I still have no idea what any of it means. Very lightweight!
That's really cool to hear that mine competes at the low level somehow!
I don't believe you that mine is faster than yours in any regard but that's pretty cool to hear how my "algorithm" might be keeping up!

So I'd be interested to see what incremental submissions your program makes to check.
What are all the submitted (alphabetically sorted string of characters) 4 letter length submits? Don't remove duplicates because that is what I have figured out how to weed out in the generation stage by never generating them in the first place.

=========PURSE
Spoiler
These are all that are submitted for example on PURSE

=========PURSES
Spoiler
As you can see with purses which does have a duplicate letter it is able to still generate duplicate submissions. There is no memory from each check to the previous to make sure it's not repeating itself. It's just mathematically sound before it asks to check at all.

Can you show me what yours says it's checked 4 length words were?
I'm looking over the complex regex right now...
Script Backups on every Execution
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=75767&p=328155#p328155

Scrabble Solver 4-15 letter word outputs ( # of inputs)
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=34285
rommmcek
Posts: 1442
Joined: 15 Aug 2014, 15:18

### Re: (Scrabble) Standalone Anagram Solver N/4-15___v1.07 + Function

First we should agree what wordlist we will be using, I guess. Otherwise comparison does not make much sense...
Just post the link!
littlegandhi1199
Posts: 194
Joined: 29 Aug 2016, 23:58

### Re: (Scrabble) Standalone Anagram Solver N/4-15___v1.07 + Function

https://drive.google.com/file/d/1ZGy_pSIBD3jEeoCX4HgYfViaBBPMhTww/view?usp=sharing
EDIT 7PM MST....changed to newer dictionary. It's arbitrary though because I wasn't asking for the responses.

I was wondering (which I'm not sure is even possible) to see the incremental requests for which the following block of code asks for a 4 letter match that it has to generate to check all 4 letter words in the list against. Above you can see exactly ALL possible variations of the input word (always sorted first) before it gets sent to check if any word has that anagram in the list.

Code: Select all

``````while (p:= RegExMatch(tl, "i`am)^[" toLettLin "]+\$", m, p+StrLen(m))) {
for i, j in % lett {
StrReplace(m, i, i, cnt)
if (cnt>jj:=j)
Break
}   cnt>jj? "": (Bin.= m "`n", st++)
if Br
Break
}   Br:= ""
``````
I'm just gonna start msgboxing that ish until I hopefully understand what's happening and can try to pull out those incremental requests.

Side Note wondering now if I even need lower length requests when I can possibly just do InStr() after generating the full length.
Assuming the full length had every possible lower length version inside of it... Sounds like I'm gonna do some testing of my own too hehe cool
Script Backups on every Execution
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=75767&p=328155#p328155

Scrabble Solver 4-15 letter word outputs ( # of inputs)
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=34285
davidwalsh1988
Posts: 1
Joined: 12 Apr 2022, 08:40

### Re: (Scrabble) Standalone Anagram Solver N/4-15___v1.07 + Function

Wow, I am an avid scrabble player and I liked your script so much that I don't have words to describe it. Earlier I used online tools to find these [Mod edit: Link removed.] . Now, I am happy that its a tool on my own pc without using internet. More power to you
littlegandhi1199
Posts: 194
Joined: 29 Aug 2016, 23:58

### Re: (Scrabble) Standalone Anagram Solver N/4-15___v1.07 + Function

davidwalsh1988 wrote:
12 Apr 2022, 08:49
Wow, I am an avid scrabble player and I liked your script so much that I don't have words to describe it. Earlier I used online tools to find these [Mod edit: Link removed.] . Now, I am happy that its a tool on my own pc without using internet. More power to you
Alright! Thank you for creating a new account to show your gratitude. It's my birthday today so that's a pretty nice little blessing.
haha. take care
Script Backups on every Execution
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=75767&p=328155#p328155

Scrabble Solver 4-15 letter word outputs ( # of inputs)
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=34285

Return to “Gaming”

### Who is online

Users browsing this forum: No registered users and 13 guests