View Single Post
  #5  
Old 05-07-2006, 01:42 PM
Roland Roland is offline
Senior Member
 
Join Date: Mar 2005
Location: Norwich, UK
Posts: 2,703
Default Re: A pretty short AHK script I made - Fastest NL script i\'ve tried

[ QUOTE ]
A very interesting idea I just had...possibly making the mouse wheel scroller thing control your bet amounts...say, each click up = +10% of the pot. If anybody would know how to do this...or even to get the pot size of the hand in the current window (i have no idea) throw some advice this way.


[/ QUOTE ]

Here's some mouse-wheel code... see the TableNavigator code on how to grab the pot size.
Just don't test this on 50/100 play money (those tables have no info in their title for some reason...).

SetTitleMatchMode 2
casino_name = PartyPlayMoney ;___change this to "Party" for real money

If (casino_name = "Party")
game_id = $
else if (casino_name = "PartyPlayMoney")
game_id = - ;___play money tables have no $-sign obviously, so we use this instead
return

#IfWinActive Good Luck
WheelUp::
WinGetTitle, title, A
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, game_id ,false, 0) + 1, InStr(title, ".") - InStr(title, game_id, false, 0) - 3 ;___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%
StringMid, bb, text, InStr(text, "/") + 1, InStr(text, ")") - InStr(text, "/") - 1 ;___so we retrieve the big blind from the static instead
}
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
}
ControlGetText, t, Edit2, %title% ;___retrieve the text from the edir next to the slider
t := t + bb
ControlSetText, Edit2, %t%, %title%
return

WheelDown::
WinGetTitle, title, A
If (InStr(title, "NL") <> 0 AND InStr(title, "Buy-in") = 0)
StringMid, bb, title, InStr(title, game_id, false, 0) + 1, InStr(title, ".") - InStr(title, game_id, false, 0) - 3
else if (InStr(title, "NL") <> 0 AND InStr(title, "Buy-in") <> 0)
{
ControlGetText, text, Static5, %title%
StringMid, bb, text, InStr(text, "/") + 1, InStr(text, ")") - InStr(text, "/") - 1
}
If bb is space
{
IfInString, title, 50.
bb = .50
else
bb = .25
}
ControlGetText, t, Edit2, %title%
t := t - bb ;___(now we decrease it)
;___no point in making it negative; however it can still get smaller than the smallest allowed bet; I might be able to fix that at a later point...
If t >= 0
ControlSetText, Edit2, %t%, %title%
return
Reply With Quote