Full Tilt Custom Lobby

By _dave_ at 2+2 forums. The corresponding thread on 2+2 is here.

This script provides a Lobby interface for Full Tilt Poker, with much needed features missing from the official client, such as:

Here is a screenshot:

ftcustomlobbyv02xh0

Hopefully some of you will find this useful :)

Enjoy!

dave.

Instructions

Open Full Tilt, run the script.

Select desired limits etc.

Single click a table to retrieve player information.

Once player info is showing, Double click a table to open.

Download

FT_Custom_Lobby-v0.2.ahk

Version History

0.01 (testing) - 27-Nov-2006

Original release

0.2 - 29-Nov-2006

Added another column:

Added more filters:

Code - Version 0.2

;;;;;;;;;;;;;;;;;  CODE STARTS HERE



#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#SingleInstance, Force
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
WinGet, lobby, id, ahk_class FTCLobby

; ***************  SETTINGS HERE ********************

refresh_frequency := 3000

; ***************  END OF SETTINGS ******************



Gui, Add, ListView, vTableList gTableListEvent x10 y10 w690 h400 AltSubmit Grid -Multi, TableID|Table Name|Stakes|Type|Plrs|Wait|Avg.Pot|Pot BBs|Plr/Flop|H/Hr
Gui, Add, ListView, vPlayerList x400 y480 w300 h160 Grid -Multi, Screen Name|BBs
ControlGet, stakes, list, Col3, SysListView323, ahk_id%lobby%
Sort, stakes, U N P2
StringReplace, stakes, stakes, `n, |, All
Gui, Add, Text, x10 y460, Stakes
Gui, Add, Listbox, 8 vStakesList x10 y480 w100 h160, %stakes%
ControlGet, types, list, Col4, SysListView323, ahk_id%lobby%
Sort, types, U R
StringReplace, types, types, `n, |, All
Gui, Add, Text, x130 y460, Type
Gui, Add, Listbox, 8 vTypesList x130 y480 w50 h120, %types%

ControlGet, seattypes, list, Col5, SysListView323, ahk_id%lobby%
seattypelist := ""
Loop, Parse, seattypes, `n
{
  StringTrimLeft, tmp, A_LoopField, InStr(A_LoopField, "/")
  seattypelist := seattypelist . tmp . "`n"
}
Sort, seattypelist, U R
StringReplace, seattypelist, seattypelist, `n, |, All
Gui, Add, Text, x200 y460, No. Seats
Gui, Add, Listbox, 8 vSeatList x200 y480 w50 h120, %seattypelist%

Gui, Add, Text, x265 y460, Min Seated
Gui, Add, DropDownList, vMinSeated x270 y480 w50, 0||1|2|3|4|5|6|7|8|9
Gui, Add, Text, x330 y460, Max Seated
Gui, Add, DropDownList, vMaxSeated x335 y480 w50, 0|1|2|3|4|5|6|7|8|9||
;Gui, Add, DropDownList, vMinSeated x270 y480 w50, 0||1|2|3|4|5|6|7|8|9

Gui, Add, Text, x270 y510, Min Avg.Pot (BBs)
Gui, Add, Edit,  x270 y530 w50 r1 Limit3 Number
Gui, Add, UpDown, vMinAvgPot Range1-500,10

Gui, Add, Text, x270 y560, Min Players/Flop (`%)
Gui, Add, Edit,  x270 y580 w50 r1 Limit3 Number
Gui, Add, UpDown, vMinPPF Range1-100,30

Gui, Add, Checkbox, vHideFull gHideFull x10 y420, Hide Full Tables
Gui, Add, Checkbox, vHideEmpty gHideEmpty x10 y440, Hide Empty Tables
Gui, Add, Checkbox, vHideOpen gHideOpen x130 y420, Hide Open Tables

Gui, Show, x0 y0 h660 w710, Full Tilt Custom Lobby v0.2 - by _dave_


ControlGet, tableinfo, list, ,SysListView323, ahk_id%lobby%
sortcol := 2
table_name := ""
table_id := 0

SetTimer, AutoRefresh, %refresh_frequency%
Return

HideFull:
return

HideEmpty:
return

HideOpen:
return

GuiClose:
ExitApp

RefreshTables:
Gui Submit, NoHide
Gui, ListView, TableList
LV_Delete()

Loop, Parse, tableinfo, `n
{
  FT_rownum := A_Index
  rowtext := A_Loopfield
  StringReplace, rowtext, rowtext, `r
  ;Msgbox, %rowtext%
  
  stakes := 0
  Loop, Parse, StakesList, |
  {
    str := "`t" . A_LoopField . "`t"
    if (InStr(rowtext, str))
    {
      stakes := 1
    }
  }
  if (!stakes)
  {
    continue
  }
  
  gametype := 0
  Loop, Parse, TypesList, |
  {
    str := "`t" . A_LoopField . "`t"
    if (InStr(rowtext, str))
    {
      gametype := 1
    }
  }
  if (!gametype)
  {
    continue
  }
  
  seatgood := 0
  Loop, Parse, SeatList, |
  {
    str := "/" . A_LoopField . "`t"
    if (InStr(rowtext, str))
    {
      seatgood := 1
    }
  }
  if (!seatgood)
  {
    continue
  }
  
  tableisopen := 0
  if (HideOpen)
  {
    WinGet, opentables, list, ahk_class FTC_TableViewFull
    Loop, %opentables%
    {
      id := opentables%A_Index%
      WinGetTitle, title, ahk_id%id%
      StringTrimRight, str, title, StrLen(title) - InStr(title, " - ")+1
      if (InStr(rowtext, str))
      {
        tableisopen := 1
      }
    }
  }
  if (tableisopen)
  {
    continue
  }
    
  
    StringTrimLeft, seats, rowtext, InStr(rowtext, "`t")-1
    StringTrimLeft, seats, seats, InStr(seats, "`t")
    StringTrimLeft, seats, seats, InStr(seats, "`t")
    StringTrimLeft, seats, seats, InStr(seats, "`t")
    StringTrimLeft, seats, seats, InStr(seats, "`t")
    StringTrimRight, seats, seats, StrLen(seats) - InStr(seats, "`t")+1
    
    StringTrimLeft, rightnum, seats, InStr(seats, "/")
    StringTrimRight, leftnum, seats, StrLen(seats) - InStr(seats, "/")+1
    
    if ((leftnum < MinSeated) || leftnum > MaxSeated)
    {
      continue
    }
    
    if (HideFull)
    {
      if (leftnum = rightnum)
      {
        continue
      }
    }
    if (HideEmpty)
    {
      if (leftnum = 0)
      {
        continue
      }
    }
  
  
  rownum := LV_Add("", "" )
  Loop, Parse, rowtext, %A_Tab%
  {
    if (A_Index = 2 && table_name)
    {
      if (table_name = A_Loopfield)
      {
        LV_Modify(rownum, "Select")
      }
    }
    if (A_Index = 1)
    {
      LV_Modify(rownum, "Col" . A_Index, FT_rownum)
    }
    else if (A_Index < 8)
    {
      LV_Modify(rownum, "Col" . A_Index, A_Loopfield)
    }
    else if (A_Index >= 8)
    {
      LV_Modify(rownum, "Col" . (A_Index+1), A_Loopfield)
    }
  }
  LV_GetText(bb, rownum, 3)
  StringTrimLeft, bb, bb, InStr(bb, "/")
  StringReplace, bb, bb, $
  LV_GetText(avgpot, rownum, 7)
  StringReplace, avgpot, avgpot, $
  avgpot := Round((avgpot / bb),2)   
  LV_Modify(rownum, "Col8", avgpot)
  
  LV_GetText(ppf, rownum, 9)
  StringReplace, ppf, ppf, `%
  
  ;minavg := 15
  if ((avgpot < MinAvgPot) || (ppf < MinPPF))
  {
    LV_Delete(rownum)
  }  
}
LV_ModifyCol(1, "AutoHdr")   
LV_ModifyCol(2, "AutoHdr")
LV_ModifyCol(3, "AutoHdr")   
LV_ModifyCol(4, "AutoHdr")  
LV_ModifyCol(5, "AutoHdr")   
LV_ModifyCol(6, "AutoHdr")  
LV_ModifyCol(7, "AutoHdr")   
LV_ModifyCol(8, "AutoHdr")  
LV_ModifyCol(9, "AutoHdr")
LV_ModifyCol(sortcol, "Logical SortDesc")


return

TableListEvent:
Critical, On
if (A_GuiEvent = "Normal" || A_GuiEvent = "DoubleClick")
{
  Gui, ListView, PlayerList
  LV_Delete()
  ;Row Clicked
  Gui, ListView, TableList
  LV_GetText(table_id, A_EventInfo, 1)
  LV_GetText(table_name, A_EventInfo, 2)
  
  ControlGet, tname, list, Focused, SysListView323, ahk_id%lobby%
  StringTrimLeft, tname, tname, InStr(tname, "`t")
  StringMid, tname, tname, 1, InStr(tname, "`t")-1
  if (tname != table_name)
  {
    ;Msgbox, %tname%`n%table_name%
    Loop
    {
      correction := 0
      ControlGet, p, list, Count Focused, SysListView323, ahk_id%lobby%
      ControlGet, p1, list, Col2, SysListView323, ahk_id%lobby%
      Loop, Parse, p1, `n
      {
        if (A_Loopfield = table_name)
        {
          correction := A_Index - p 
        }
      }
      ;Msgbox, %correction%
      if (correction = 0)
      {
        break
      }
      else if (correction < 0)
      {
        correction := correction - (correction *2)
        ;tooltip, up %correction%
        
        if (correction > 16)
        {
          correction := correction // 17
          Loop, %correction%
          {
            ControlSend, SysListView323, {PGUP}, ahk_id%lobby%
          }
          Sleep, 333
          continue
        }
        
        Loop, %correction%
        {
          ControlSend, SysListView323, {UP}, ahk_id%lobby%
        }
      }
      else if (correction > 0)
      {
        ;tooltip, down %correction%
        
        if (correction > 16)
        {
          correction := correction // 17
          Loop, %correction%
          {
            ControlSend, SysListView323, {PGDN}, ahk_id%lobby%
          }
          Sleep, 333
          continue
        }
        
        Loop, %correction%
        {
          ControlSend, SysListView323, {DOWN}, ahk_id%lobby%
          
        }
      }
      Sleep, 333
    }  
  }
  if (A_GuiEvent = "DoubleClick")
  {
    ControlSend, SysListView323, {ENTER}, ahk_id%lobby%
  }
  else
  {
    LV_GetText(numplayers, A_EventInfo, 5)
    StringTrimRight, numplayers, numplayers, StrLen(numplayers) - InStr(numplayers, "/")+1
    if (numplayers)
    {
      Loop, 100
      {
        ControlGet, playerinfo, list, , SysListView321, ahk_id%lobby%
        if (InStr(playerinfo, "$"))
        {
          ;Msgbox, %playerinfo%
          
          break      
        }
        else
        {
          Sleep, 50
        }
      }
      
      LV_GetText(bb, A_EventInfo, 3)
      StringTrimLeft, bb, bb, InStr(bb, "/")
      StringReplace, bb, bb, $
      ;Msgbox, %bb%
      
      Gui, ListView, PlayerList
      
      Loop, Parse, playerinfo, `n
      {
        rowtext := A_Loopfield
        StringReplace, rowtext, rowtext, `r
        StringReplace, rowtext, rowtext, `,
        StringTrimLeft, rowtext, rowtext, InStr(rowtext, "`t")-1
        rownum := LV_Add("", "" )
        Loop, Parse, rowtext, %A_Tab%
        {
          if (A_Index = 1)
          {
            continue
          }
          else if (A_Index = 3)
          {
            StringReplace, chips, A_LoopField, $
            LV_Modify(rownum, "Col" . (A_Index -1), Floor(chips // bb))
            continue
          }
          else
          {
            LV_Modify(rownum, "Col" . (A_Index -1), A_Loopfield)
          }
          
        }
      }
      LV_ModifyCol()
      LV_ModifyCol(2, "Logical SortDesc")   
      LV_ModifyCol(1, "AutoHdr")   
      LV_ModifyCol(2, "AutoHdr")   
    }   
  }
  
}
else if (A_GuiEvent = "ColClick")
{
  ;Col Header Clicked
  sortcol := A_EventInfo
  LV_ModifyCol(sortcol, "Logical SortDesc")
  
}

Critical, Off
return


AutoRefresh:
WinGet, lobby, id, ahk_class FTCLobby
ControlGet, tableinfo2, list, ,SysListView323, ahk_id%lobby%

if (tableinfo2 = tableinfo)
{
  return
}
tableinfo := tableinfo2
GoSub, RefreshTables
return
;;;;;;;;;;;;;;;;;  CODE ENDS HERE

CategoryAutoHotKey

FullTiltCustomLobby (last edited 2006-11-29 01:47:17 by Dave)