I don't know all the rules of chess but I did have an idea for you. I've uploaded an example so you could look and see if it's close to what your looking for.
http://www.autohotkey.net/~specter333/Misc/Chess.zip
And here the script.
Code:
p1dis = square63
p2dis = square64
Gui, Add, Pic, x0 y0 vsquare11 gsquare, black.jpg
Gui, Add, Pic, x50 y0 vsquare12 gsquare, white.jpg
Gui, Add, Pic, x100 y0 vsquare13 gsquare, black.jpg
Gui, Add, Pic, x150 y0 vsquare14 gsquare, white.jpg
Gui, Add, Pic, x200 y0 vsquare15 gsquare, black.jpg
Gui, Add, Pic, x250 y0 vsquare16 gsquare, white.jpg
Gui, Add, Pic, x0 y50 vsquare21 gsquare, white.jpg
Gui, Add, Pic, x50 y50 vsquare22 gsquare, black.jpg
Gui, Add, Pic, x100 y50 vsquare23 gsquare, white.jpg
Gui, Add, Pic, x150 y50 vsquare24 gsquare, black.jpg
Gui, Add, Pic, x200 y50 vsquare25 gsquare, white.jpg
Gui, Add, Pic, x250 y50 vsquare26 gsquare, black.jpg
Gui, Add, Pic, x0 y100 vsquare31 gsquare, black.jpg
Gui, Add, Pic, x50 y100 vsquare32 gsquare, white.jpg
Gui, Add, Pic, x100 y100 vsquare33 gsquare, black.jpg
Gui, Add, Pic, x150 y100 vsquare34 gsquare, white.jpg
Gui, Add, Pic, x200 y100 vsquare35 gsquare, black.jpg
Gui, Add, Pic, x250 y100 vsquare36 gsquare, white.jpg
Gui, Add, Pic, x0 y150 vsquare41 gsquare, white.jpg
Gui, Add, Pic, x50 y150 vsquare42 gsquare, black.jpg
Gui, Add, Pic, x100 y150 vsquare43 gsquare, white.jpg
Gui, Add, Pic, x150 y150 vsquare44 gsquare, black.jpg
Gui, Add, Pic, x200 y150 vsquare45 gsquare, white.jpg
Gui, Add, Pic, x250 y150 vsquare46 gsquare, black.jpg
Gui, Add, Pic, x0 y200 vsquare51 gsquare, black.jpg
Gui, Add, Pic, x50 y200 vsquare52 gsquare, white.jpg
Gui, Add, Pic, x100 y200 vsquare53 gsquare, black.jpg
Gui, Add, Pic, x150 y200 vsquare54 gsquare, white.jpg
Gui, Add, Pic, x200 y200 vsquare55 gsquare, black.jpg
Gui, Add, Pic, x250 y200 vsquare56 gsquare, white.jpg
Gui, Add, Pic, x0 y250 vsquare61 gsquare, white.jpg
Gui, Add, Pic, x50 y250 vsquare62 gsquare, black.jpg
Gui, Add, Pic, x100 y250 Disabled vsquare63 gsquare, white.jpg
Gui, Add, Pic, x150 y250 Disabled vsquare64 gsquare, black.jpg
Gui, Add, Pic, x200 y250 vsquare65 gsquare, white.jpg
Gui, Add, Pic, x250 y250 vsquare66 gsquare, black.jpg
Gui, Add, Pic, x100 y250 BackgroundTrans vpiece1 gselpiece, piece1.png
Gui, Add, Pic, x150 y250 BackgroundTrans vpiece2 gselpiece, piece2.png
Gui, Add, Pic, x-50 y0 BackgroundTrans vmark, marked.png
Gui, Show, y10 w300 h300, Chess Example
Return
selpiece:
Gui, Submit, NoHide
selected = %A_GuiControl%
GuiControlGet, piecepos, Pos, %selected%
Return
square:
Gui, Submit, NoHide
moveto = %A_GuiControl%
GuiControlGet, squarepos, Pos, %moveto%
If selected =
Return
GuiControl, Move, mark, x%squareposx% y%squareposy%
GoTo movepiece
Return
GuiClose:
Gui, Destroy
ExitApp
movepiece:
MsgBox, 4, , Move %selected% to %moveto%?
IfMsgBox, No
{
GuiControl, Move, mark, x-50 y0
moveto =
Return
}
IfMsgBox, Yes
{
GoSub %selected%
GuiControl, Move, mark, x-50 y0
GuiControl, Move, %selected%, x%squareposx% y%squareposy%
}
selected =
moveto =
Return
piece1:
If pieceposx = %squareposx%
{
GuiControl, Enable, %p1dis%
GuiControl, Disable, %moveto%
p1dis = %moveto%
Return
}
If pieceposy = %squareposy%
{
GuiControl, Enable, %p1dis%
GuiControl, Disable, %moveto%
p1dis = %moveto%
Return
}
MsgBox, This Piece can only move horizontally or vertically.`nPlease try again.
moveto =
selected =
GoTo = selpiece
Return
For this to work you would have to be a math wiz and create a rule for every chess piece. I only made a rule for the "O" piece to move horizontally or vertically, the other piece doesn't move. I should also point out that I didn't make any rules for taking other pieces, only moving a piece around the board.
Notice each square's variable has it's position on the board, ie. square35 is x3 y5, this makes it easy to keep track of what square is being selected. Also every square the piece is sitting on when the game begins needs to be disabled and a variable assigned as to what piece is disabling (sitting on) so it can be enabled when the piece moves.
I think this will get you started if you can write all the rules for each piece and develop a method to change turns when a player moves. That last part should be easy, all the rules will be a challenge.
Good Luck