View Single Post
  #17  
Old 11-04-2007, 09:15 PM
Xanderz Xanderz is offline
Senior Member
 
Join Date: Oct 2007
Posts: 230
Default Re: AHK: how to read PokerStars Lobby? ( source code reward or maybe c

[ QUOTE ]
It just (perfectly, instantly) adds the name of the table, then stops (no players). It doesn't seems to make any difference if I select another table manually (to force a playerlist refresh).

[/ QUOTE ]
This tell me it is getting stuck in the following loop:
<font class="small">Code:</font><hr /><pre> t := TV_Add(table, 0, "Bold")
ControlGetPos, px, py, , , %PokerStars_PlayerList%
Loop { ; check if player list has been refreshed, wait if not
local bgr := Display_getPixel(context, px, py)
if Display_IsBlue(bgr, v)
break
Display_DeleteWindowCapture(device, context, pixels)
Sleep, 100
Display_CreateWindowCapture(device, context, pixels)
}</pre><hr />
Display_IsBlue(bgr, v) probably needs to be changed to Display_IsDark(bgr, v)

Is the selected row color not blue for you? The IsDark function should work for any opaque color.

Edit: Actually, it could be getting stuck trying to select the next table
<font class="small">Code:</font><hr /><pre> ; load next player list before reading the current player list
y := PokerStars_SelectNextTable(minPlayers, true)
PokerStars_ReadPlayerList(context, t)</pre><hr />
Those are the lines immediately following the forementioned loop. It is obviously not getting to the PokerStars_ReadPlayerList line, so it could be getting stuck in the PokerStars_SelectNextTable function.
Reply With Quote