|
#1
|
|||
|
|||
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. |
#2
|
|||
|
|||
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. |
#3
|
|||
|
|||
Re: AHK: how to read PokerStars Lobby? ( source code reward or maybe c
[ QUOTE ]
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. [/ QUOTE ]It should only move the selection to the second player before the table is selected. That way it is possible to tell when the list is refreshed as the selection will go back to the first player. It sounds like it selecting the second player after the table is selected? Or maybe this method is flawed in that the selection doesn't reset to the first player for you when it is refreshed. I know of no other way to tell as you can't really go by the first player name as that could be the same for two different tables. I suppose both name and chip count could be compared. |
|
|