This test will take 10 pixels per table, run it please.
Code:
#NoEnv
#SingleInstance, Force
Settitlematchmode, 2
SysGet, xbord, 32
SysGet, ybord, 33
SysGet, cap, 4
f12::
StartTime:=A_TickCount
WinGet, listst, List, ahk_class PokerStarsTableFrameClass
WinGet, listft, List, ahk_class Logged in QWidget,,Full Tilt
Loop, %listst%
{
win:=listst%A_index%
col%A_index%:=PixelColorA(0.8,0.7,win,30)
}
Loop, %listft%
{
win:=listft%A_index%
col%A_index%:=PixelColorA(0.8,0.7,win,30)
}
ElapsedTime:=A_TickCount - StartTime
Gui, 2:Add, Text,,%ElapsedTime% milliseconds have elapsed
Gui, 2:+ToolWindow
Gui, 2:Show, w180 h40
Sleep, 1000
Gui, 2:Destroy
return
CreateDIBSection(hDC, nW, nH, bpp = 32, ByRef pBits = "") {
NumPut(VarSetCapacity(bi, 40, 0), bi)
NumPut(nW, bi, 4)
NumPut(nH, bi, 8)
NumPut(bpp, NumPut(1, bi, 12, "UShort"), 0, "Ushort")
NumPut(0, bi,16)
Return DllCall("gdi32\CreateDIBSection", "Uint", hDC, "Uint", &bi, "Uint", 0, "UintP", pBits, "Uint", 0, "Uint", 0)
}
PixelColorA(colxa,colya,id,delta)
{
critical
setwindelay,-1
global xbord,ybord,cap
hdc_frame := DllCall( "GetDC", "UInt", id)
hdc_buffer := DllCall("gdi32.dll\CreateCompatibleDC", "UInt", hdc_frame)
WinGetPos,,, W, H, ahk_id %id%
hbm_buffer := DllCall("gdi32.dll\CreateCompatibleBitmap", "UInt",hdc_frame, "Int",w, "Int",h)
;hbm_buffer := CreateDIBSection(hdc_frame, w, h)
DllCall( "gdi32.dll\SelectObject", "UInt",hdc_buffer, "UInt",hbm_buffer)
DllCall( "PrintWindow", "UInt" , id , "UInt" , hdc_buffer , "UInt" , 0 )
WinGet,ctrls,ControlList,ahk_id %id%
Loop,Parse,ctrls,`n
{
class:=A_LoopField
ControlGet,ctrlid,Hwnd,,%class%,ahk_id %id%
ControlGet,visible,Visible,,,ahk_id %ctrlid%
If visible=1
DllCall("RedrawWindow","Uint",ctrlid,"Uint",0,"Uint",0,"Uint", 1|16|32|64|2048)
}
DllCall("RedrawWindow","Uint",id,"Uint",0,"Uint",0,"Uint", 1|16|32|64|1024)
x:=floor(((W-2*xbord)*colxa) + xbord)
y:=floor(((H-(2*ybord)-cap)*colya) + ybord + cap)
pix:=""
delta:=0
loop 10
{
pix%A_index% := DllCall("GetPixel", "UInt", hdc_buffer, "Int", x+delta , "Int", y+delta)
delta+=5
pix:=pix . pix%A_index% . "-"
}
DllCall( "gdi32.dll\DeleteObject", "Uint", hbm_buffer )
DllCall( "gdi32.dll\ReleaseDC" , "Uint", hdc_frame )
DllCall( "gdi32.dll\DeleteDC" , "Uint", hdc_frame )
DllCall( "gdi32.dll\DeleteDC" , "Uint", hdc_buffer )
return pix
}