Anagram Solver by Littlegandhi1199 Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
littlegandhi1199
Posts: 49
Joined: 29 Aug 2016, 23:58

Anagram Solver by Littlegandhi1199

06 Jul 2017, 01:51

Alright.
I've finished my anagram solver and it solves all permutations of 4 letter words up to 15 letter words for an infinitely long word used as your input.
I cracked the code to do it all perfectly and without error and is detailed herehttps://autohotkey.com/boards/viewtopic ... 19&t=34285 along with the script!
Last edited by littlegandhi1199 on 14 Jul 2017, 18:35, edited 2 times in total.
Scrabble Solver 4-15 letter word outputs ( :crazy: # of inputs)
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=34285

Sudoku Grid Generator + BONUS Custom Variant - Fun Pending...
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=65054&p=279321#p279321
WalkerOfTheDay
Posts: 484
Joined: 24 Mar 2016, 03:01

Re: StrReplace function not functioning  Topic is solved

06 Jul 2017, 02:04

Remove the percent signs in the StrReplace function:
Not sure what you are trying to do ? Replace a with a ??

Code: Select all

Bin = "aaaaaaaaaaaaaaaaaaaaaa"

string = a
StrReplace(Bin, string, , OutputVarCount, 1)
if (OutputVarCount > 0)
	msgbox, found %string% in %bin%
else
	msgbox, did not find %string% in %bin%
littlegandhi1199
Posts: 49
Joined: 29 Aug 2016, 23:58

Re: StrReplace function not functioning

06 Jul 2017, 02:07

Thought I had played with all the most obvious variable recognition lol
read through the help doc twice until I was sure i had done that part right.
Thank you thank you. My debugging needs sharpened
Scrabble Solver 4-15 letter word outputs ( :crazy: # of inputs)
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=34285

Sudoku Grid Generator + BONUS Custom Variant - Fun Pending...
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=65054&p=279321#p279321
littlegandhi1199
Posts: 49
Joined: 29 Aug 2016, 23:58

Re: StrReplace function not functioning

06 Jul 2017, 02:12

Also I am making an anonym solver using 455k non duplicated english words.
Was finding the fastest method available to me.
Want to see once I'm done or are you happily on about your business?
Scrabble Solver 4-15 letter word outputs ( :crazy: # of inputs)
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=34285

Sudoku Grid Generator + BONUS Custom Variant - Fun Pending...
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=65054&p=279321#p279321
WalkerOfTheDay
Posts: 484
Joined: 24 Mar 2016, 03:01

Re: StrReplace function not functioning

06 Jul 2017, 02:14

You're welcome. I have made (and still make) these mistakes a million times too :)

Not sure what an anonym solver is, but sure let's see it when you're ready.
littlegandhi1199
Posts: 49
Joined: 29 Aug 2016, 23:58

Re: StrReplace function not functioning

08 Jul 2017, 05:06

Walkeroftheday
anagram, woops.
you don't have to run that exe in the zip but you will need the dictionaries in there.
run this script right alongside those and pick any word (it'll take letters from it and will not repeat any but try to find the longest word using them)
You can define any words you don't recognize in the same inputbox!

beware the whole thing is buggy though and still usually can only run one solve per boot. But test out my little toy and let me know what you think
https://www.dropbox.com/s/1rcjmjnfsn05ryi/zip.zip?dl=0


If A_IsCompiled != 1
Menu, Tray, Icon, C:\Program Files\AutoHotkey\AutoHotkey.exe, 2
#MaxMem 4196
let := 1
stop = 1
add := 0
finalvar = 0
check := Chr(124)
setbatchlines, -1
Settimer, curent, 100
Array := Object()
Gui, Add, Tab2,, 4 letters|5 letters|6 letters|7 letters|8 letters|9 letters|10 letters|11 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 ; 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.
GuiControl,, MyEditDef, Pulling from list of 100,000 english words
Gui, Show,, Anagram Finder
return
GuiClose:
exitapp
ButtonDefine:
Gui, Submit
Gui, Show
FileDelete, tempish.txt
UrlDownloadToFile, https://www.google.com/search?q=define+ ... 8&oe=utf-8, tempish.txt
If Errorlevel
msgbox, fail
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%
;;msgbox, %temp1%%temp2%
sim = %temp1%%temp2%
}
GuiControl,, MyEditDef, %sim%
return

ButtonOK:
add := 0
Gui, Submit ; Save the input from the user to each control's associated variable.
if (last = FirstName)
{
stop = 1
Gui, Show
MsgBox, ,, SEARCH STOPPED, 1
sleep 150
MsgBox, ,, SEARCH STOPPED, 1
return
}
else
{
loop, 11
{
GuiControl,, MyEdit%A_Index%, ...
IfExist, next%A_Index%.txt
FileDelete, next%A_Index%.txt
}
stop = 0
}
last = %FirstName%
if (StrLen(FirstName) > 11)
{
msgbox, exceeded limit
Gui, Show
return
}
Gui, Show
input = %FirstName%
loop
{
stringtrimright, zinput, input, % StrLen(input)-1
stringtrimleft, input, input, 1
cont := zinput
if (cont = "")
break
Array[A_Index] := zinput
}




mak = 0
;;;;;;;;;;;;;;;;;;;;;;;;;; 4
Bin =
FileRead, Bin, len4.txt
loop, % Array.MaxIndex()
{
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
}
}
}
gosub finalmaster
gosub newfinal
;;;;;;;;;;;;;;;;;;;;;;;;;; 4-2
Bin =
FileRead, Bin, len4.txt
loop, % Array.MaxIndex()
{
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
}
}
}
gosub finalmaster
gosub newfinal
mak = 0
;;;;;;;;;;;;;;;;;;;;;;;;;; 5
Bin =
FileRead, Bin, len5.txt
loop, % Array.MaxIndex()
{
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
}
}
}
}
gosub finalmaster
gosub newfinal
;;;;;;;;;;;;;;;;;;;;;;;;;; 5-2
Bin =
FileRead, Bin, len5.txt
loop, % Array.MaxIndex()
{
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
}
}
}
}
gosub finalmaster
gosub newfinal
mak = 0
;;;;;;;;;;;;;;;;;;;;;;;;;; 6
Bin =
FileRead, Bin, len6.txt
loop, % Array.MaxIndex()
{
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
}
}
}
}
}
gosub finalmaster
gosub newfinal
;;;;;;;;;;;;;;;;;;;;;;;;;; 6-2
Bin =
FileRead, Bin, len6.txt
loop, % Array.MaxIndex()
{
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
}
}
}
}
}
gosub finalmaster
gosub newfinal
mak = 0
;;;;;;;;;;;;;;;;;;;;;;;;;; 7
Bin =
FileRead, Bin, len7.txt
loop, % Array.MaxIndex()
{
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
}
}
}
}
}
}
gosub finalmaster
gosub newfinal
;;;;;;;;;;;;;;;;;;;;;;;;;; 7-2
Bin =
FileRead, Bin, len7.txt
loop, % Array.MaxIndex()
{
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
}
}
}
}
}
}
gosub finalmaster
gosub newfinal
mak = 0
;;;;;;;;;;;;;;;;;;;;;;;;;; 8
Bin =
FileRead, Bin, len8.txt
loop, % Array.MaxIndex()
{
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
}
}
}
}
}
}
}
gosub finalmaster
gosub newfinal
;;;;;;;;;;;;;;;;;;;;;;;;;; 8-2
Bin =
FileRead, Bin, len8.txt
loop, % Array.MaxIndex()
{
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
}
}
}
}
}
}
}
gosub finalmaster
gosub newfinal
mak = 0
;;;;;;;;;;;;;;;;;;;;;;;;;; 9
Bin =
FileRead, Bin, len9.txt
loop, % Array.MaxIndex()
{
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
}
}
}
}
}
}
}
}
gosub finalmaster
gosub newfinal
;;;;;;;;;;;;;;;;;;;;;;;;;; 9-2
Bin =
FileRead, Bin, len9.txt
loop, % Array.MaxIndex()
{
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
}
}
}
}
}
}
}
}
gosub finalmaster
gosub newfinal
mak = 0
;;;;;;;;;;;;;;;;;;;;;;;;;; 10
Bin =
FileRead, Bin, len10.txt
loop, % Array.MaxIndex()
{
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
}
}
}
}
}
}
}
}
}
gosub finalmaster
gosub newfinal
;;;;;;;;;;;;;;;;;;;;;;;;;; 10-2
Bin =
FileRead, Bin, len10.txt
loop, % Array.MaxIndex()
{
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
}
}
}
}
}
}
}
}
}
gosub finalmaster
gosub newfinal
mak = 0
;;;;;;;;;;;;;;;;;;;;;;;;;; 11
Bin =
FileRead, Bin, len11.txt
loop, % Array.MaxIndex()
{
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
}
}
}
}
}
}
}
}
}
}
gosub finalmaster
gosub newfinal
;;;;;;;;;;;;;;;;;;;;;;;;;; 11-2
Bin =
FileRead, Bin, len11.txt
loop, % Array.MaxIndex()
{
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
}
}
}
}
}
}
}
}
}
}
gosub finalmaster
gosub newfinal






newfinal:
fact := let+4
11 = 11
endl := Factorial(11)
newn := 11-fact
newnl := Factorial(newn)
realend := endl/newnl
pre := realend*1.5
pre /= 35000
realend := Ceil(pre)
;;div := fact*5
div := 10
div1 := realend/div
realend := Ceil(div1)
;;value := A_TickCount-prevnumber1
;;fileappend, %value%`n, timestamp.txt
;;prevnumber1 := A_TickCount
totalit = 0
return

themaster:
if (mak = 1)
{
totalit++
if (totalit > realend)
{
gosub finalmaster
totalit = 0
}
}
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))
continue
what := Array[A_Index]
var = %z%%what%
finalvar = %finalvar%|%var%
}
return

finalmaster:
If (Bin ~= finalvar)
{
mak = 1
thefinalvar =
thefinalvar := StrSplit(finalvar, check)
loop, % thefinalvar.MaxIndex()
{
var := thefinalvar[A_Index]
If (Bin ~= var)
fileappend, %var%`n, next%let%.txt
}
}
finalvar = 1
return

curent:
if stop = 1
return
if (add < let)
{
fileread, tempvar, next%add%.txt
Sort, tempvar, U
blank =
StrReplace(tempvar, FirstName, blank, OutputVarCount1)
StringReplace, tempvar, tempvar, %FirstName%, , All
StrReplace(tempvar, "`n", "`n", OutputVarCount)
OutputVarCount -= OutputVarCount1
stringtrimright, tempvar, tempvar, 1
GuiControl,, MyEdit%Add%, %OutputVarCount% anagrams!`n%tempvar%
add++
}
else
{
fileread, tempvar, next%let%.txt
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if slap = 1
GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams.`n%tempvar%
if slap = 2
GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams..`n%tempvar%
if slap = 3
{
GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams...`n%tempvar%
slap = 0
}
slap++
}
return

Factorial(n)
{
if n < 3
return n
else
return n*Factorial(n-1)
}

f10::
msgbox, %z%`n%let%
return
Scrabble Solver 4-15 letter word outputs ( :crazy: # of inputs)
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=34285

Sudoku Grid Generator + BONUS Custom Variant - Fun Pending...
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=65054&p=279321#p279321
littlegandhi1199
Posts: 49
Joined: 29 Aug 2016, 23:58

Re: StrReplace function not functioning

08 Jul 2017, 05:08

WalkerOfTheDay wrote:You're welcome. I have made (and still make) these mistakes a million times too :)

Not sure what an anonym solver is, but sure let's see it when you're ready.
Check it out ^^^
Scrabble Solver 4-15 letter word outputs ( :crazy: # of inputs)
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=34285

Sudoku Grid Generator + BONUS Custom Variant - Fun Pending...
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=65054&p=279321#p279321
WalkerOfTheDay
Posts: 484
Joined: 24 Mar 2016, 03:01

Re: Anagram Solver by Littlegandhi1199

08 Jul 2017, 06:38

I don't have access to a pc atm, but as zoon as I do I'll have a look.

One tip, when sharing code, please put [ code] tags around it otherwise you lose the formatting.

I did a quick test and it does create some anagrams, but shouldn't this:
Knipsel.JPG
Knipsel.JPG (27.5 KiB) Viewed 1779 times
Show at least the 6 letter word 'letter' ? It is on the wordlist.

I haven't looked at your code at all.
littlegandhi1199
Posts: 49
Joined: 29 Aug 2016, 23:58

Re: Anagram Solver by Littlegandhi1199

08 Jul 2017, 16:56

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

Sudoku Grid Generator + BONUS Custom Variant - Fun Pending...
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=65054&p=279321#p279321
littlegandhi1199
Posts: 49
Joined: 29 Aug 2016, 23:58

Re: Anagram Solver by Littlegandhi1199

10 Jul 2017, 15:56

WalkerOfTheDay wrote:I don't have access to a pc atm, but as zoon as I do I'll have a look.

One tip, when sharing code, please put [ code] tags around it otherwise you lose the formatting.

I did a quick test and it does create some anagrams, but shouldn't this:

Knipsel.JPG

Show at least the 6 letter word 'letter' ? It is on the wordlist.

I haven't looked at your code at all.
Alright.
I've finished my anagram solver and it solves all permutations of 4 letter words up to 15 letter words for an infinitely long word used as your input.
I cracked the code to do it all perfectly and without error and is detailed herehttps://autohotkey.com/boards/viewtopic ... 19&t=34285 along with the script!
Scrabble Solver 4-15 letter word outputs ( :crazy: # of inputs)
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=34285

Sudoku Grid Generator + BONUS Custom Variant - Fun Pending...
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=65054&p=279321#p279321

Return to “Ask For Help”

Who is online

Users browsing this forum: boiler, vsub and 69 guests