Code: Select all
; Sudoku Cracker 1.0 by Oldbrother
pp=0
Lsize=2
trylist=0
trylistN=0
TargetWin =SudokuCracker 1.0
Gui, Font, s15 cDefault
Gui, Add, Edit, x16 y10 w30 h30 Limit1 Va0000,
Gui, Add, Edit, x46 y10 w30 h30 Limit1 Va0001,
Gui, Add, Edit, x76 y10 w30 h30 Limit1 Va0002,
Gui, Add, Edit, x108 y10 w30 h30 Limit1 Va0100,
Gui, Add, Edit, x138 y10 w30 h30 Limit1 Va0101,
Gui, Add, Edit, x168 y10 w30 h30 Limit1 Va0102,
Gui, Add, Edit, x200 y10 w30 h30 Limit1 Va0200,
Gui, Add, Edit, x230 y10 w30 h30 Limit1 Va0201,
Gui, Add, Edit, x260 y10 w30 h30 Limit1 Va0202,
;--------------------------------------
Gui, Add, Edit, x16 y40 w30 h30 Limit1 Va0010,
Gui, Add, Edit, x46 y40 w30 h30 Limit1 Va0011,
Gui, Add, Edit, x76 y40 w30 h30 Limit1 Va0012,
Gui, Add, Edit, x108 y40 w30 h30 Limit1 Va0110,
Gui, Add, Edit, x138 y40 w30 h30 Limit1 Va0111,
Gui, Add, Edit, x168 y40 w30 h30 Limit1 Va0112,
Gui, Add, Edit, x200 y40 w30 h30 Limit1 Va0210,
Gui, Add, Edit, x230 y40 w30 h30 Limit1 Va0211,
Gui, Add, Edit, x260 y40 w30 h30 Limit1 Va0212,
;--------------------------------------
Gui, Add, Edit, x16 y70 w30 h30 Limit1 Va0020,
Gui, Add, Edit, x46 y70 w30 h30 Limit1 Va0021,
Gui, Add, Edit, x76 y70 w30 h30 Limit1 Va0022,
Gui, Add, Edit, x108 y70 w30 h30 Limit1 Va0120,
Gui, Add, Edit, x138 y70 w30 h30 Limit1 Va0121,
Gui, Add, Edit, x168 y70 w30 h30 Limit1 Va0122,
Gui, Add, Edit, x200 y70 w30 h30 Limit1 Va0220,
Gui, Add, Edit, x230 y70 w30 h30 Limit1 Va0221,
Gui, Add, Edit, x260 y70 w30 h30 Limit1 Va0222,
;--------------------------------------
;--------------------------------------
Gui, Add, Edit, x16 y102 w30 h30 Limit1 Va1000,
Gui, Add, Edit, x46 y102 w30 h30 Limit1 Va1001,
Gui, Add, Edit, x76 y102 w30 h30 Limit1 Va1002,
Gui, Add, Edit, x108 y102 w30 h30 Limit1 Va1100,
Gui, Add, Edit, x138 y102 w30 h30 Limit1 Va1101,
Gui, Add, Edit, x168 y102 w30 h30 Limit1 Va1102,
Gui, Add, Edit, x200 y102 w30 h30 Limit1 Va1200,
Gui, Add, Edit, x230 y102 w30 h30 Limit1 Va1201,
Gui, Add, Edit, x260 y102 w30 h30 Limit1 Va1202,
Gui, Add, Edit, x16 y132 w30 h30 Limit1 Va1010,
Gui, Add, Edit, x46 y132 w30 h30 Limit1 Va1011,
Gui, Add, Edit, x76 y132 w30 h30 Limit1 Va1012,
Gui, Add, Edit, x108 y132 w30 h30 Limit1 Va1110,
Gui, Add, Edit, x138 y132 w30 h30 Limit1 Va1111,
Gui, Add, Edit, x168 y132 w30 h30 Limit1 Va1112,
Gui, Add, Edit, x200 y132 w30 h30 Limit1 Va1210,
Gui, Add, Edit, x230 y132 w30 h30 Limit1 Va1211,
Gui, Add, Edit, x260 y132 w30 h30 Limit1 Va1212,
Gui, Add, Edit, x16 y162 w30 h30 Limit1 Va1020,
Gui, Add, Edit, x46 y162 w30 h30 Limit1 Va1021,
Gui, Add, Edit, x76 y162 w30 h30 Limit1 Va1022,
Gui, Add, Edit, x108 y162 w30 h30 Limit1 Va1120,
Gui, Add, Edit, x138 y162 w30 h30 Limit1 Va1121,
Gui, Add, Edit, x168 y162 w30 h30 Limit1 Va1122,
Gui, Add, Edit, x200 y162 w30 h30 Limit1 Va1220,
Gui, Add, Edit, x230 y162 w30 h30 Limit1 Va1221,
Gui, Add, Edit, x260 y162 w30 h30 Limit1 Va1222,
;-----------------------------------
Gui, Add, Edit, x16 y194 w30 h30 Limit1 Va2000,
Gui, Add, Edit, x46 y194 w30 h30 Limit1 Va2001,
Gui, Add, Edit, x76 y194 w30 h30 Limit1 Va2002,
Gui, Add, Edit, x108 y194 w30 h30 Limit1 Va2100,
Gui, Add, Edit, x138 y194 w30 h30 Limit1 Va2101,
Gui, Add, Edit, x168 y194 w30 h30 Limit1 Va2102,
Gui, Add, Edit, x200 y194 w30 h30 Limit1 Va2200,
Gui, Add, Edit, x230 y194 w30 h30 Limit1 Va2201,
Gui, Add, Edit, x260 y194 w30 h30 Limit1 Va2202,
Gui, Add, Edit, x16 y224 w30 h30 Limit1 Va2010,
Gui, Add, Edit, x46 y224 w30 h30 Limit1 Va2011,
Gui, Add, Edit, x76 y224 w30 h30 Limit1 Va2012,
Gui, Add, Edit, x108 y224 w30 h30 Limit1 Va2110,
Gui, Add, Edit, x138 y224 w30 h30 Limit1 Va2111,
Gui, Add, Edit, x168 y224 w30 h30 Limit1 Va2112,
Gui, Add, Edit, x200 y224 w30 h30 Limit1 Va2210,
Gui, Add, Edit, x230 y224 w30 h30 Limit1 Va2211,
Gui, Add, Edit, x260 y224 w30 h30 Limit1 Va2212,
Gui, Add, Edit, x16 y254 w30 h30 Limit1 Va2020,
Gui, Add, Edit, x46 y254 w30 h30 Limit1 Va2021,
Gui, Add, Edit, x76 y254 w30 h30 Limit1 Va2022,
Gui, Add, Edit, x108 y254 w30 h30 Limit1 Va2120,
Gui, Add, Edit, x138 y254 w30 h30 Limit1 Va2121,
Gui, Add, Edit, x168 y254 w30 h30 Limit1 Va2122,
Gui, Add, Edit, x200 y254 w30 h30 Limit1 Va2220,
Gui, Add, Edit, x230 y254 w30 h30 Limit1 Va2221,
Gui, Add, Edit, x260 y254 w30 h30 Limit1 Va2222,
Gui, Font, s8 cDefault
Gui, Add, Button, x300 y50 w60 h23,Save
Gui, Add, Button, x300 y73 w60 h23,Restore
Gui, Add, Button, x300 y100 w60 h23 default,Crack
Gui, Add, Button, x300 y123 w60 h23,Clear
Gui, Add, Button, x300 y260 w60 h25,Quit
Gui, Add, Radio,x305 y10 w25 h20 vR1,1
Gui, Add, Radio,x332 y10 w25 h20 VR2,2
Gui, Add, Radio,x305 y30 w25 h20 VR3,3
Gui, Add, Radio,x332 y30 w25 h20 VR4,4
GuiControl,,R1,1
E=0
F=0
X=0
Y=0
name=0
loop 3
{
F=0
X=0
Y=0
loop 3
{
X=0
Y=0
loop 3
{
y=0
loop 3
{
name++
Edit%name%=%E%%X%%F%%Y%
Y+=1
}
X+=1
}
F+=1
}
E+=1
}
;----------------------------------
Gui, Show,h300 w370, %TargetWin%
Return
GuiClose:
ExitApp
ButtonSave:
Gui, Submit,NoHide
if (R1=1)
store=S1
if (R2=1)
store=S2
if (R3=1)
store=S3
if (R4=1)
store=S4
E=0
F=0
X=0
Y=0
po=0
loop 3
{
F=0
X=0
Y=0
loop 3
{
X=0
Y=0
loop 3
{
y=0
loop 3
{
%store%%E%%F%%X%%Y% =% a%E%%F%%X%%Y%
Y+=1
}
X+=1
}
F+=1
}
E+=1
}
Return
ButtonRestore:
Gui, Submit,NoHide
E=0
F=0
X=0
Y=0
Lsize=2
trylist=0
trylistN=0
loop 3
{
F=0
X=0
Y=0
loop 3
{
X=0
Y=0
loop 3
{
y=0
loop 3
{
GuiControl,, a%E%%F%%X%%Y%,
Gui, Font, cDefault
GuiControl, Font, a%E%%F%%X%%Y%
Y+=1
}
X+=1
}
F+=1
}
E+=1
}
if (R1=1)
store=S1
if (R2=1)
store=S2
if (R3=1)
store=S3
if (R4=1)
store=S4
E=0
F=0
X=0
Y=0
loop 3
{
F=0
X=0
Y=0
loop 3
{
X=0
Y=0
loop 3
{
y=0
loop 3
{
GuiControl,, a%E%%F%%X%%Y%,% %store%%E%%F%%X%%Y%
Y+=1
}
X+=1
}
F+=1
}
E+=1
}
Return
ButtonQuit:
ExitApp
;WinSet,redraw, ,Cube Solution
Return
ButtonClear:
E=0
F=0
X=0
Y=0
pp=0
Lsize=2
trylist=0
trylistN=0
loop 3
{
F=0
X=0
Y=0
loop 3
{
X=0
Y=0
loop 3
{
y=0
loop 3
{
Gui, Font, cDefault
GuiControl, Font, a%E%%F%%X%%Y%
GuiControl,, a%E%%F%%X%%Y%,
Y+=1
}
X+=1
}
F+=1
}
E+=1
}
return
ButtonCrack:
start:
Gui, Submit,NoHide
E=0
F=0
X=0
Y=0
spaces=0
E=0
F=0
X=0
Y=0
loop 3
{
F=0
X=0
Y=0
loop 3
{
X=0
Y=0
loop 3
{
y=0
loop 3
{
n%E%%F%%X%%Y%=
if a%E%%F%%X%%Y%=
{
Gui, Font, s15 CRed
GuiControl, Font, a%E%%F%%X%%Y%
spaces++
k=0
loop 9
{
k+=1
a%E%%F%%X%%Y%L%k%=%k%
}
n%E%%F%%X%%Y%=9
A=0
B=0
loop 3
{
B=0
loop 3
{
K=0
loop % n%E%%F%%X%%Y%
{
k+=1
if a%E%%F%%X%%Y%L%k%=% a%E%%F%%A%%B%
{
j:=n%E%%F%%X%%Y%-k
i=%K%
loop %j%
{
h:=i+1
a%E%%F%%X%%Y%L%i%=% a%E%%F%%X%%Y%L%h%
i++
}
n%E%%F%%X%%Y%:=n%E%%F%%X%%Y%-1
}
}
B+=1
}
A+=1
}
A=0
B=0
loop 3
{
B=0
loop 3
{
K=0
loop % n%E%%F%%X%%Y%
{
k+=1
if a%E%%F%%X%%Y%L%k%=% a%E%%A%%X%%B%
{
j:=n%E%%F%%X%%Y%-k
i=%K%
loop %j%
{
h:=i+1
a%E%%F%%X%%Y%L%i%=% a%E%%F%%X%%Y%L%h%
i++
}
n%E%%F%%X%%Y%:=n%E%%F%%X%%Y%-1
}
}
B+=1
}
A+=1
}
A=0
B=0
loop 3
{
B=0
loop 3
{
K=0
loop % n%E%%F%%X%%Y%
{
k+=1
if a%E%%F%%X%%Y%L%k%=% a%A%%F%%B%%Y%
{
j:=n%E%%F%%X%%Y%-k
i=%K%
loop %j%
{
h:=i+1
a%E%%F%%X%%Y%L%i%=% a%E%%F%%X%%Y%L%h%
i++
}
n%E%%F%%X%%Y%:=n%E%%F%%X%%Y%-1
}
}
B+=1
}
A+=1
}
if n%E%%F%%X%%Y%=1
{
a%E%%F%%x%%y%=% a%E%%F%%X%%Y%L1
GuiControl,, a%E%%F%%X%%Y%, % a%E%%F%%X%%Y%L1
n%E%%F%%X%%Y%=
}
}
Y+=1
}
X+=1
}
F+=1
}
E+=1
}
E=0
F=0
X=0
Y=0
loop 3
{
F=0
X=0
Y=0
loop 3
{
X=0
Y=0
loop 3
{
y=0
loop 3
{
if (n%E%%F%%X%%Y%>1)
{
A=0
B=0
i=0
loop 3 ;find group
{
B=0
loop 3
{
if (n%E%%F%%X%%Y%=n%E%%F%%A%%B%)
{
z=% n%E%%F%%X%%Y%
sameV=0
k=0
loop %z%
{
k+=1
if a%E%%F%%X%%Y%L%k%=% a%E%%F%%A%%B%L%k%
sameV++
}
if (sameV=Z)
{
i+=1
sameV%i%=%E%%F%%A%%B%
}
}
B+=1
}
A+=1
}
if i=% n%E%%F%%X%%Y% ; if a group exists
{
A=0
B=0
j=0
loop 3 ;find other spacess
{
B=0
loop 3
{
if (n%E%%F%%A%%B%>1)
{
jjj=0
Nname=%E%%F%%A%%B%
Lsame=0
loop %i%
{
jjj+=1
if (Nname=sameV%jjj%)
Lsame++
}
if Lsame=0
{
j+=1
nnn%j%=%E%%F%%A%%B%
}
}
B+=1
}
A+=1
}
}
if i=% n%E%%F%%X%%Y%
{
z=% n%E%%F%%X%%Y%
jj=0
loop %j%
{
jj+=1
zz=0
loop %z%
{
zz+=1
vvv=% a%E%%F%%X%%Y%L%zz%
k=0
LL=% NNN%jj% ;ll=2202
nnn=n%LL% ;nnn=n2202
nnnn=% %nnn% ;nnnn=6
loop %nnnn%
{
k+=1
if a%LL%L%k%=%vvv%
{
xx:=nnnn-k
ii=%K%
loop %xx%
{
h:=ii+1
a%LL%L%ii%=% a%LL%L%h%
ii++
}
n%LL%:=n%LL%-1
if n%LL%=1
{
a%LL%=% a%LL%L1
GuiControl,, a%LL%, % a%LL%L1
n%LL%=
}
}
}
}
}
}
;-----------------------------------
A=0
B=0
i=0
loop 3 ;find group
{
B=0
loop 3
{
if (n%E%%F%%X%%Y%=n%E%%A%%X%%B%)
{
z=% n%E%%F%%X%%Y%
sameV=0
k=0
loop %z%
{
k+=1
if a%E%%F%%X%%Y%L%k%=% a%E%%A%%X%%B%L%k%
sameV++
}
if (sameV=Z)
{
i+=1
sameV%i%=%E%%A%%X%%B%
}
}
B+=1
}
A+=1
}
if i=% n%E%%F%%X%%Y% ; if a group exists
{
A=0
B=0
j=0
loop 3 ;find other spacess
{
B=0
loop 3
{
if (n%E%%A%%X%%B%>1)
{
jjj=0
Nname=%E%%A%%X%%B%
Lsame=0
loop %i%
{
jjj+=1
if (Nname=sameV%jjj%)
Lsame++
}
if Lsame=0
{
j+=1
nnn%j%=%E%%A%%X%%B%
}
}
B+=1
}
A+=1
}
}
if i=% n%E%%F%%X%%Y%
{
z=% n%E%%F%%X%%Y%
jj=0
loop %j%
{
jj+=1
zz=0
loop %z%
{
zz+=1
vvv=% a%E%%F%%X%%Y%L%zz%
k=0
LL=% NNN%jj% ;ll=2202
nnn=n%LL% ;nnn=n2202
nnnn=% %nnn% ;nnnn=6
loop %nnnn%
{
k+=1
if a%LL%L%k%=%vvv%
{
xx:=nnnn-k
ii=%K%
loop %xx%
{
h:=ii+1
a%LL%L%ii%=% a%LL%L%h%
ii++
}
n%LL%:=n%LL%-1
if n%LL%=1
{
a%LL%=% a%LL%L1
GuiControl,, a%LL%, % a%LL%L1
n%LL%=
}
}
}
}
}
}
;-----------------------------------
A=0
B=0
i=0
loop 3 ;find group
{
B=0
loop 3
{
if (n%E%%F%%X%%Y%=n%A%%F%%B%%Y%)
{
z=% n%E%%F%%X%%Y%
sameV=0
k=0
loop %z%
{
k+=1
if a%E%%F%%X%%Y%L%k%=% a%A%%F%%B%%Y%L%k%
sameV++
}
if (sameV=Z)
{
i+=1
sameV%i%=%A%%F%%B%%Y%
}
}
B+=1
}
A+=1
}
if i=% n%E%%F%%X%%Y% ; if a group exists
{
A=0
B=0
j=0
loop 3 ;find other spacess
{
B=0
loop 3
{
if (n%A%%F%%B%%Y%>1)
{
jjj=0
Nname=%A%%F%%B%%Y%
Lsame=0
loop %i%
{
jjj+=1
if (Nname=sameV%jjj%)
Lsame++
}
if Lsame=0
{
j+=1
nnn%j%=%A%%F%%B%%Y%
}
}
B+=1
}
A+=1
}
}
if i=% n%E%%F%%X%%Y%
{
z=% n%E%%F%%X%%Y%
jj=0
loop %j%
{
jj+=1
zz=0
loop %z%
{
zz+=1
vvv=% a%E%%F%%X%%Y%L%zz%
k=0
LL=% NNN%jj% ;ll=2202
nnn=n%LL% ;nnn=n2202
nnnn=% %nnn% ;nnnn=6
loop %nnnn%
{
k+=1
if a%LL%L%k%=%vvv%
{
xx:=nnnn-k
ii=%K%
loop %xx%
{
h:=ii+1
a%LL%L%ii%=% a%LL%L%h%
ii++
}
n%LL%:=n%LL%-1
if n%LL%=1
{
a%LL%=% a%LL%L1
GuiControl,, a%LL%, % a%LL%L1
n%LL%=
}
}
}
}
}
}
;-----------------------------------
}
Y+=1
}
X+=1
}
F+=1
}
E+=1
}
;--------------------------------------
;--------------------------------------
E=0
F=0
X=0
Y=0
loop 3
{
F=0
X=0
Y=0
loop 3
{
X=0
Y=0
loop 3
{
y=0
loop 3
{
if (n%E%%F%%X%%Y%>1)
{
A=0
B=0
i=0
loop 3 ;find group
{
B=0
loop 3
{
if (n%E%%F%%X%%Y%=n%E%%F%%A%%B%)
{
z=% n%E%%F%%X%%Y%
sameV=0
k=0
loop %z%
{
k+=1
if a%E%%F%%X%%Y%L%k%=% a%E%%F%%A%%B%L%k%
sameV++
}
if (sameV=Z)
{
i+=1
sameV%i%=%E%%F%%A%%B%
}
}
B+=1
}
A+=1
}
if i=% n%E%%F%%X%%Y% ; if a group exists
{
A=0
B=0
j=0
loop 3 ;find other spacess
{
B=0
loop 3
{
if (n%E%%F%%A%%B%>1)
{
jjj=0
Nname=%E%%F%%A%%B%
Lsame=0
loop %i%
{
jjj+=1
if (Nname=sameV%jjj%)
Lsame++
}
if Lsame=0
{
j+=1
nnn%j%=%E%%F%%A%%B%
}
}
B+=1
}
A+=1
}
}
if i=% n%E%%F%%X%%Y%
{
z=% n%E%%F%%X%%Y%
jj=0
loop %j%
{
jj+=1
zz=0
loop %z%
{
zz+=1
vvv=% a%E%%F%%X%%Y%L%zz%
k=0
LL=% NNN%jj% ;ll=2202
nnn=n%LL% ;nnn=n2202
nnnn=% %nnn% ;nnnn=6
loop %nnnn%
{
k+=1
if a%LL%L%k%=%vvv%
{
xx:=nnnn-k
ii=%K%
loop %xx%
{
h:=ii+1
a%LL%L%ii%=% a%LL%L%h%
ii++
}
n%LL%:=n%LL%-1
if n%LL%=1
{
a%LL%=% a%LL%L1
GuiControl,, a%LL%, % a%LL%L1
n%LL%=
}
}
}
}
}
}
;-----------------------------------
A=0
B=0
i=0
loop 3 ;find group
{
B=0
loop 3
{
if (n%E%%F%%X%%Y%=n%E%%A%%X%%B%)
{
z=% n%E%%F%%X%%Y%
sameV=0
k=0
loop %z%
{
k+=1
if a%E%%F%%X%%Y%L%k%=% a%E%%A%%X%%B%L%k%
sameV++
}
if (sameV=Z)
{
i+=1
sameV%i%=%E%%A%%X%%B%
}
}
B+=1
}
A+=1
}
if i=% n%E%%F%%X%%Y% ; if a group exists
{
A=0
B=0
j=0
loop 3 ;find other spacess
{
B=0
loop 3
{
if (n%E%%A%%X%%B%>1)
{
jjj=0
Nname=%E%%A%%X%%B%
Lsame=0
loop %i%
{
jjj+=1
if (Nname=sameV%jjj%)
Lsame++
}
if Lsame=0
{
j+=1
nnn%j%=%E%%A%%X%%B%
}
}
B+=1
}
A+=1
}
}
if i=% n%E%%F%%X%%Y%
{
z=% n%E%%F%%X%%Y%
jj=0
loop %j%
{
jj+=1
zz=0
loop %z%
{
zz+=1
vvv=% a%E%%F%%X%%Y%L%zz%
k=0
LL=% NNN%jj% ;ll=2202
nnn=n%LL% ;nnn=n2202
nnnn=% %nnn% ;nnnn=6
loop %nnnn%
{
k+=1
if a%LL%L%k%=%vvv%
{
xx:=nnnn-k
ii=%K%
loop %xx%
{
h:=ii+1
a%LL%L%ii%=% a%LL%L%h%
ii++
}
n%LL%:=n%LL%-1
if n%LL%=1
{
a%LL%=% a%LL%L1
GuiControl,, a%LL%, % a%LL%L1
n%LL%=
}
}
}
}
}
}
;-----------------------------------
A=0
B=0
i=0
loop 3 ;find group
{
B=0
loop 3
{
if (n%E%%F%%X%%Y%=n%A%%F%%B%%Y%)
{
z=% n%E%%F%%X%%Y%
sameV=0
k=0
loop %z%
{
k+=1
if a%E%%F%%X%%Y%L%k%=% a%A%%F%%B%%Y%L%k%
sameV++
}
if (sameV=Z)
{
i+=1
sameV%i%=%A%%F%%B%%Y%
}
}
B+=1
}
A+=1
}
if i=% n%E%%F%%X%%Y% ; if a group exists
{
A=0
B=0
j=0
loop 3 ;find other spacess
{
B=0
loop 3
{
if (n%A%%F%%B%%Y%>1)
{
jjj=0
Nname=%A%%F%%B%%Y%
Lsame=0
loop %i%
{
jjj+=1
if (Nname=sameV%jjj%)
Lsame++
}
if Lsame=0
{
j+=1
nnn%j%=%A%%F%%B%%Y%
}
}
B+=1
}
A+=1
}
}
if i=% n%E%%F%%X%%Y%
{
z=% n%E%%F%%X%%Y%
jj=0
loop %j%
{
jj+=1
zz=0
loop %z%
{
zz+=1
vvv=% a%E%%F%%X%%Y%L%zz%
k=0
LL=% NNN%jj% ;ll=2202
nnn=n%LL% ;nnn=n2202
nnnn=% %nnn% ;nnnn=6
loop %nnnn%
{
k+=1
if a%LL%L%k%=%vvv%
{
xx:=nnnn-k
ii=%K%
loop %xx%
{
h:=ii+1
a%LL%L%ii%=% a%LL%L%h%
ii++
}
n%LL%:=n%LL%-1
if n%LL%=1
{
a%LL%=% a%LL%L1
GuiControl,, a%LL%, % a%LL%L1
n%LL%=
}
}
}
}
}
}
;-----------------------------------
}
Y+=1
}
X+=1
}
F+=1
}
E+=1
}
Gui, Submit,NoHide
E=0
F=0
X=0
Y=0
spaces2=0
loop 3
{
F=0
X=0
Y=0
loop 3
{
X=0
Y=0
loop 3
{
y=0
loop 3
{
if a%E%%F%%X%%Y%=
spaces2++
Y+=1
}
X+=1
}
F+=1
}
E+=1
}
if (spaces2<spaces)
goto start
if (spaces2=0)
goto stop
else
{
if(trylist=0)
{
trylist=1
lp=
lv=
lll=0
E=0
F=0
X=0
Y=0
loop 3
{
F=0
X=0
Y=0
loop 3
{
X=0
Y=0
loop 3
{
y=0
loop 3
{
temp%E%%F%%X%%Y% =% a%E%%F%%X%%Y%
if a%E%%F%%X%%Y%=
{
if (n%E%%F%%X%%Y%=2)
{
ss=0
loop %Lsize%
{
ss++
lll++
lp%lll%=%E%%F%%X%%Y%
lv%lll%=% a%E%%F%%X%%Y%L%ss%
}
}
}
Y+=1
}
X+=1
}
F+=1
}
E+=1
}
E=0
F=0
X=0
Y=0
loop 3
{
F=0
X=0
Y=0
loop 3
{
X=0
Y=0
loop 3
{
y=0
loop 3
{
temp%E%%F%%X%%Y% =% a%E%%F%%X%%Y%
if a%E%%F%%X%%Y%=
{
if (n%E%%F%%X%%Y%=3)
{
ss=0
loop %Lsize%
{
ss++
lll++
lp%lll%=%E%%F%%X%%Y%
lv%lll%=% a%E%%F%%X%%Y%L%ss%
}
}
}
Y+=1
}
X+=1
}
F+=1
}
E+=1
}
} ;trylist
if lll=0
{
msgbox No solutions.
goto stop
}
if (trylist=1)
{
trylistN++
if (trylistN>lll)
{
msgbox No solutions.
goto stop
}
E=0
F=0
X=0
Y=0
loop 3
{
F=0
X=0
Y=0
loop 3
{
X=0
Y=0
loop 3
{
y=0
loop 3
{
GuiControl,, a%E%%F%%X%%Y%,% temp%E%%F%%X%%Y%
Y+=1
}
X+=1
}
F+=1
}
E+=1
}
change=% lp%trylistN%
GuiControl,, a%change%,% lv%trylistN%
goto start
}
}
stop:
return
right::
send {tab}
return
left::
Send, {SHIFTDOWN}{TAB}{SHIFTUP}
return
down::
send, {Tab 9}
return
up::
Send, {SHIFTDOWN}{TAB 9}{SHIFTUP}
return