About

The corresponding thread on 2+2 is here.

Auto-clicks the Party timebank in SNGs for you.

Code

; #### PartyAutoTimeBank ####

#Persistent
#SingleInstance Ignore
#NoEnv

checkfield = AfxWnd42u37 ; AfxWnd42u37 is timebank control
LobbyWindowTitle = Poker Lobby ; identify poker lobby substring
TableWindowTitle = Buy-in. ; identify pokertable substring
interval = 1000 ; period between refreshes

Loop
{
  TableIDList(LobbyId())
  Sleep %interval%
}

LobbyId()
{
  local rid
  SetTitleMatchMode 2
  WinGet, rid, ID, %LobbyWindowTitle%
  return rid
}

TableIDList(lobbyID)
{
  local pid,rlist,this_id,name,result
  SetTitleMatchMode 2
  WinGet, pid, PID, ahk_id%lobbyID%
  WinGet, rlist, LIST, %TableWindowTitle% ahk_pid%pid%
  Loop %rlist%
  {
    this_id := rlist%a_index%
    If this_id != %lobbyID%
    {
      WinGetTitle, name, ahk_id%this_id%
      ControlGet, result, Visible, , %checkfield%, ahk_id%this_id%
      if (result)
      {
        ControlClick %checkfield%, ahk_id%this_id% ;Click timebank
      }
    }
  }
  return
} 


CategoryAutoHotKey

PartyAutoTimeBank (last edited 2009-06-27 05:46:38 by cpe-76-87-0-55)