View Single Post
  #20  
Old 11-05-2007, 11:03 PM
_dave_ _dave_ is offline
Senior Member
 
Join Date: Feb 2005
Location: UK
Posts: 2,628
Default Re: AHK: how to read PokerStars Lobby? ( source code reward or maybe c

[ QUOTE ]
[ 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.


[/ QUOTE ]

Sweet, found the trouble [img]/images/graemlins/smile.gif[/img]

I didn't have to edit anything, but your explanation helped me pinpoint it.

For me, after moving to a new table, it selects player 2 on the player list - therefore gets stuck in the loop you pointed at, since it looks for player1 to be highlighted.

If I rapidly click on player1, it works a treat [img]/images/graemlins/smile.gif[/img]

Now to try and figure why... I changed my desktop to standard XP theme (my initial guess) and this did not help [img]/images/graemlins/frown.gif[/img]

dave.
Reply With Quote