Hi. I am trying to modify a function on a poker script..
This functions purpose is to gather information from a window that says how many 'tournaments' the user is registered in.
Code:
CountTourneys() {
global
WinMenuSelectItem, PokerStars Lobby,, Requests, Registered In Tournaments
WinWait, Registered In Tournaments ahk_class #32770, , 10
WinGet, ritw, id
ControlGetText, nf, Button1, ahk_id%ritw%
If (nf = "OK")
{
ControlFocus, Button1, ahk_id%ritw%
Sleep, -1
ControlSend, Button1, {Space}, ahk_id%ritw%
{
If (minlob=1)
WinMinimize, PokerStars Lobby
}
Return 0
}
ControlGet, Tlist, List,, ListBox1, ahk_id%ritw%
ControlFocus, Button2, ahk_id%ritw%
Sleep, -1
ControlSend, Button2, {Space}, ahk_id%ritw%
{
If (minlob=1)
WinMinimize, PokerStars Lobby
}
StringSplit, tlist, tlist, `n
If (tlist0 > 4)
trows:=tlist0
GuiControl, , trows, %trows%
Loop %tlist0%
{
t:=tlist%A_index%
If A_index=1
LV_Delete()
LV_Add("", t)
LV_ModifyCol()
LV_DeleteCol(2)
}
Gui, show, NoActivate, %thisahk%
Return tlist0
}
I would like to have this function, CountTourneys(), only count 'tournaments' that contain certain text in their names.
What commands to I need? And my real confusion is 'where to stick' those commands.