Quote:
Originally Posted by grinderkk
hi when i remove the table frame, is there a way to have the name on the table displayed on the table ?
AHK Script from Party EzCASH autor Highsteaks.
I use it for SnGs you have to makes some changes.
[PHP]
#SingleInstance, force
#NoEnv
#Persistent
DetectHiddenText, off
SetTitleMatchMode 2
;-------------------------- User - defined ------------------------------
DisplayColor = White
BackColor = 141414
;--- party techno 333333
;--- party green 005500
;--- wpt blue 000088
;--- or black,green,yellow etc
;-------------------------------------------------------------------------------
Loop
{
lobby_id := WinExist("Poker Lobby")
If (lobby_id)
Break
}
PlayerCount()
SetTimer, SNG_Titles, 250
SetTimer, PlayerCount, 5000
Return
;-------------------------------------------------------------------------------
SNG_Titles:
SNG_Titles()
Return
PlayerCount:
PlayerCount()
Return
;-------------------------------------------------------------------------------
SNG_Titles()
{
local id,list
WinGet, list, list, Buy-in ahk_class #32770
Loop %list%
{
id := list%a_index%
If ( !Display%id% && !ExcludeTourney%id% && !ItsATourney(id))
{
DisplayList := Add_To_List(DisplayList,id,"Front")
SNG_CreateGUI(id,DisplayTitle(GetWinTitle(id)),SNG _GetAGuiNum(id))
Return
}
}
If (DisplayList)
CheckDisplays()
}
CheckDisplays()
{
local id,Title,x,y,w,h,x1,y1,w1,h1,WinID
Loop, Parse, DisplayList, `,
{
id := A_LoopField
If ( Not WinExist("ahk_id" . id))
{
EndDisplay(id)
DisplayList := Remove_From_List(DisplayList,id)
Return
}
Else
{
Num := Display%id%
WinID := Gui%Num%
Winset, Top, , ahk_id %WinID%
WinGetPos, x,y,w,h, ahk_id %id%
x1 := x%id%
y1 := y%id%
w1 := w%id%
h1 := h%id%
If (x != x1 || y != y1 || w != w1 || h != h1)
{
EndDisplay(id)
Title := Title%id%
SNG_CreateGUI(id,DisplayTitle(Title),SNG_GetAGuiNu m(id))
Return
}
}
}
}
EndDisplay(id)
{
local Num
Num := Display%id%
Gui%Num% =
Display%id% =
SNG_Display%Num% =
Gui, %Num%: Destroy
}
PlayerCount()
{
local Title,Gamelist
If ( Not WinExist("Poker Lobby"))
lobby_id =
lobby_id := lobby_id ? lobby_id : WinExist("Poker Lobby")
ControlGet, Gamelist, List, , SysListView321, ahk_id %lobby_id%
Loop, Parse, Gamelist, `n
{
Loop, Parse, A_LoopField, %A_Tab%
{
If A_Index in 2,3,4
Continue
If (A_Index = 1)
{
Title := StripTitle(A_LoopField)
If (Players%Title% || WinExist(Title))
Break
}
Else If (A_Index = 5)
{
Players = %A_LoopField%
If InStr(A_LoopField, "/2")
Players%Title% := " - HU"
Else If InStr(A_LoopField, "/6")
Players%Title% := " - 6 max"
Else If InStr(A_LoopField, "/10")
Players%Title% := " - FR"
Else
Players%Title% := 1
If (Players)
Break
}
Else If (A_Index = 6 && A_LoopField != "Registering")
Players%Title% := 1
}
}
}
StripTitle(Title)
{
StringLeft, T_Title,Title,5
If InStr(T_Title, "Table")
{
StringTrimLeft, Title, Title, 7
If (InStr(Title, A_Space))
{
StringGetPos, Pos, Title, %A_Space%
StringLeft, Title, Title, Pos
}
}
Else
{
StringGetPos, Pos, Title, #
Pos++
StringTrimLeft, Title, Title, Pos
If InStr(Title, A_Space)
{
StringGetPos, Pos, Title, %A_Space%
StringLeft, Title, Title, Pos
}
}
Return Title
}
ItsATourney(id)
{
local title,Exclude
WinGetTitle, title, ahk_id %id%
If ( Not InStr(title,"$") && Not InStr(title, "€"))
Exclude := 1
Else If title in Gtd,Guaranteed,Rebuy,Deepstack,Regular,Shootout
Exclude := 1
Else If title in Bounty,Ante Up,[256 Max],Action,High Roller
Exclude := 1
If (Exclude)
{
ExcludeTourney%id% := 1
Return 1
}
}
SNG_GetAGuiNum(id)
{
local Num
Num := 1
Loop, 18
{
If (SNG_Display%Num%)
Num++
Else
{
SNG_Display%Num% := 1
Display%id% := Num ;---this Number is taken-
Break
}
}
Return Num
}
SNG_CreateGUI(id,Display,Num)
{
local x,y,w,h,Players,Title,FontSize,Y_Display,WinID
Gui %Num%: Default
Title := StripTitle(GetWinTitle(id))
Players := Players%Title%
If (Players = 1 || Players ="")
Players =
Display := Display . a_Space . a_Space . Players
WinGetPos,x,y,w,h, ahk_id %id%
FontSize := (w < 600) ? 12
: (w < 700) ? 12
: (w < 800) ? 12
: 12
Y_Display := (w < 600) ? 30
: (w < 700) ? 30
: 30
x%id% := x
y%id% := y
w%id% := w
h%id% := h
x += 600
y += 2
w -= 670
Gui, +LastFound +AlwaysOnTop -Caption +ToolWindow
Gui, Font, s%FontSize%, Arial Bold
Gui, Color, %BackColor%
Gui, Add, Text, x20 y%Y_Display% c%DisplayColor%, %Display%
Gui, Show, x%x% y%y% w%w% h53 NoActivate
Gui%Num% := WinExist()
WinID := Gui%Num%
WinSet, Region, 5-30 %w%-30 %w%-53 5-53 5-30, ahk_id %WinID%
}
GetWinTitle(id)
{
local Title
Title := Title%id%
If (Title)
Return Title
WinGetTitle, title, ahk_id %id%
If InStr(title, "Table loading")
Return
Title%id% := Title
Return Title
}
DisplayTitle(Title)
{
local A_Title,Pos
If (InStr(Title, "Nothing (") || InStr(Title, "Nothing #"))
A_Title = DON SNG
Else If (InStr(Title, "Nothing Turbo"))
A_Title = DON Turbo
Else If (InStr(Title, "Hyper Turbo"))
A_Title =Hyper
Else If (InStr(Title, "Turbo"))
A_Title = Turbo
Else If (InStr(Title, "Table"))
A_Title = SNG
StringGetPos, Pos, Title, Buy-in
StringLeft, Title, Title, %Pos%
If ( !Currency)
Currency(Title)
If (FunnyMoney)
{
StringGetPos, Pos, Title, $
Pos--
StringLeft, Title, Title, %Pos%
StringGetPos, Pos, Title, %a_space%, R
Pos++
StringTrimLeft, Title, Title, %Pos%
Title = %Title% $
}
Else
{
StringGetPos, Pos, Title, $
StringTrimLeft, Title, Title, %Pos%
StringGetPos, Pos, Title, %a_Space%
StringLeft, Title, Title, %Pos%
}
Title := Title . a_Space . a_Space . A_Title
Return Title
}
Currency(Title)
{
local Pos
StringGetPos, Pos, Title, $
Pos++
StringTrimLeft, Title, Title, %Pos%
If Title Not Contains 1,2,3,4,5,6,7,8,9
FunnyMoney := 1
Currency := 1
}
Add_To_List(List,Var,Pos)
{
If (Var && !List)
Return Var
Else If ( !var || InStr(List, Var))
Return List
Else If (Pos = "Front")
List := Var . ","List
Else If (Pos = "Rear")
List := List . ","Var
Return List
}
Remove_From_List(List,Var)
{
If ( !var || Not InStr(List, Var))
Return List
If (List = var)
{
List =
Return List
}
NewVar := "," . Var
If InStr(List, NewVar)
{
StringReplace, List, List, %NewVar%,,
Return List
}
NewVar := Var . ","
If InStr(List, NewVar)
{
StringReplace, List, List, %NewVar%,,
Return List
}
}
[/PHP]