Re: A pretty short AHK script I made - Fastest NL script i\'ve tried
Okay, some more changes. The table ´no longer has to be active and it should work with MTH.
SetTitleMatchMode 2
GroupAdd, tables, Good Luck,,, PartyPoker.com
GroupAdd, tables, Logged In as,,, PokerStars Lobby
GroupAdd, tables, Logged In As,,, PokerStars Lobby
return
~WheelUp::
MouseGetPos,,,id
SetText(id,"up")
return
~WheelDown::
MouseGetPos,,,id
SetText(id,"down")
return
SetText(win, dir)
{
WinGetTitle, title, ahk_id%win%
WinGetClass, class, ahk_id%win%
If title not contains good luck,logged in as
return
If class not in #32770,Afx:400000:28:10011:0:1420423,FTC_TableView Full
return
If (InStr(title, "Logged In as") AND class <> "FTC_TableViewFull")
{
If (InStr(title, "No Limit") <> 0 AND InStr(title, "Tournament") = 0) ;___if "NL" is in the title but "Tournament" isn't...
StringMid, bb, title, InStr(title, "/") + 1, InStr(title, a_space,"", InStr(title, "/")) - InStr(title, "/") - 1 ;___retrieve the big blind
else if (InStr(title, "No Limit") <> 0 AND InStr(title, "Tournament") <> 0) ;___else this is a tourney
{
StringMid, bb, title, InStr(title, "/", "", InStr(title, "Blinds")) + 1
, InStr(title, a_space, "", InStr(title, "Blinds") + 8) - InStr(title, "/", "", InStr(title, "Blinds")) - 1 ;___so we retrieve the big blind instead
}
edit_num = 6
}
else If (class = "FTC_TableViewFull")
{
StringMid, bb, title, InStr(title, "/") + 1, InStr(title, a_space,"", InStr(title, "/")) - InStr(title, "/") - 1
edit_num = 1
}
else
{
If (InStr(title, "NL") <> 0 AND InStr(title, "Buy-in") = 0) ;___if "NL" is in the title but "Buy-in" isn't...
{
StringMid, bb, title, InStr(title, "-","", 0) + 2, InStr(title, ".") - InStr(title,"-", "", 0) - 4 ;___retrieve the big blind
}
else if (InStr(title, "NL") <> 0 AND InStr(title, "Buy-in") <> 0) ;___else this is a tourney
{
ControlGetText, text, Static5, %title%
IfNotInString, text, Blinds-Antes
StringMid, bb, text, InStr(text, "/") + 1, InStr(text, ")") - InStr(text, "/") - 1 ;___so we retrieve the big blind from the static instead
else
StringMid, bb, text, InStr(text, "/") + 1, InStr(text, "-","",InStr(text, "/")) - InStr(text, "/") - 1
}
edit_num = 2
}
StringReplace,bb,bb,$,,1
If bb is space ;___this is for .25/.50 or .50/1 tables; "space" means whitespace (spaces, tabs, linefeeds..)
{
IfInString, title, 50.
bb = .50
else
bb = .25
}
If bb = .25
sb := .10
else if bb = 15
sb = 10
else if bb = 0.05
sb = 0.02
else
sb := bb/2
ControlGetText, t, Edit%edit_num%, %title% ;___retrieve the text from the edir next to the slider
If t is space
t = %bb%
If dir = up
t := t + sb
else
t := t - sb
If t >= 0
ControlSetText, Edit%edit_num%, %t%, %title%
}
|