Post by Mick on Jan 19, 2010 23:13:04 GMT
Create a new au3 in the bot folder file and name it, findchecksum.au3
edit it by deleting default text in it and pasting in this code...
Go to an empty table and run the code for a second or two, just until the mouse moves to the top left corner, then press Esc key to exit
there will be a new file in your folder named newchecksums
Add them one at a time from top to bottom to table.txt in your data folder and test each time
till your bot records seats correctly
its usually the first checksum
edit it by deleting default text in it and pasting in this code...
#include <file.au3>
Global $browserTitle = IniRead(@ScriptDir & "\settings.ini","Browser","browser_title","Poker Bot Console")
Global $sTableChecksums = StringSplit(FileRead('..\data\table.txt'),',')
HotKeySet("{ESC}", "_exit")
Find_Table()
Func Find_Table($iStart=0)
Local $aPosition[2]
$Path = @ScriptDir & "\newtablechecksum.txt"
Local $aWinPos = WinGetPos($browserTitle)
If IsArray($aWinPos) And $aWinPos[2] And $aWinPos[0]>0 Then
If $iStart==0 Then
$iStart = $iStart+$aWinPos[1]
EndIf
$aSearch = PixelSearch($aWinPos[0],$iStart,$aWinPos[2],$aWinPos[3], 0x364C63);
Else
$aSearch = PixelSearch(0,$iStart,@DesktopWidth,@DesktopHeight, 0x364C63);
EndIf
If @error <> 0 Then
;_Log('WARNING - table color not found on screen')
Return $aPosition
EndIf
$iChecksum = PixelChecksum($aSearch[0]-1,$aSearch[1]-1,$aSearch[0],$aSearch[1])
If $iStart==0 Then _FileWriteLog($Path,'try these checksums')
_FileWriteLog($Path, $aSearch[0] & 'x' & $aSearch[1] & ' - ' & $iChecksum)
MouseMove($aSearch[0],$aSearch[1],10)
Sleep(1000)
For $i = 1 to $sTableChecksums[0]
If $iChecksum==Int($sTableChecksums[$i]) Then
$aPosition[0] = $aSearch[0]
$aPosition[1] = $aSearch[1]
EndIf
Next
If Not $aPosition[0] Then
$aPosition = Find_Table($aSearch[1]+1)
EndIf
Return $aPosition
EndFunc
Func _exit()
Exit
EndFunc
Go to an empty table and run the code for a second or two, just until the mouse moves to the top left corner, then press Esc key to exit
there will be a new file in your folder named newchecksums
Add them one at a time from top to bottom to table.txt in your data folder and test each time
till your bot records seats correctly
its usually the first checksum