View Single Post
  #74  
Old 02-28-2007, 08:35 AM
Paul B. Paul B. is offline
Senior Member
 
Join Date: Mar 2005
Location: Thailand soon?
Posts: 5,160
Default Re: My PokerStars SNG AHK script

[ QUOTE ]
It works well for me except the registration does only work 80% of the time and the "all in" is not OK as my table are resized. I think it could be possible to adjust the script to the resized window but it would be a bit of work

[/ QUOTE ]

Oh, I fixed those a while ago but never posted the update. Here:

[ QUOTE ]

#NoEnv
#Persistent
#SingleInstance force
#Include E:\gambling\Software\PokerStars\Functions.ahk

Loop
{
AutoRegister()
NoMsgBox()
}

^1:: ;__Cascades tables
PostStarsClick(450, 60, ExFromList(tablesStars()))
SendPlay c
return

^2:: ;__Closes tournament lobbies
CloseTournamentLobby()
return

~MButton:: ;__Pushes all-in
MouseGetPos,,, curWin
ControlSetText, Edit7, 999999, ahk_id%curWin%
return



~RButton::
WinGet,id,,A
WinGetTitle, title, ahk_id%id%

IfInString, title, No Limit Hold'em
{
Slash := Instr(title, "/") + 2
Space := Instr(title, " ", false, Slash)
BBLength := Space - Slash
StringMid, Bigblind, title, Slash, BBLength
Transform, RaiseAmount, Round, Bigblind * 2.5

MouseGetPos,,, curWin
ControlSetText, Edit7, %RaiseAmount%, ahk_id%curWin%
}
return




Autoregister()
{
SetTitleMatchMode 2
IfWinExist, Tournament Registration
{
WinGet, winID, ID, Tournament Registration
ControlClick, Button1, ahk_id %winID%

Loop
{
SetTitleMatchMode 2
ControlGet, chk, Checked, , Button1, ahk_id %winID%
if chk
break
ControlClick, Button1, ahk_id %winID%
}
ControlClick, Button4, ahk_id %winID%
}
}

CloseTournamentLobby()
{
Loop
{
SetTitleMatchMode 2
IfWinExist, Lobby,, PokerStars Lobby
WinClose
else
break
}
}

NoMsgBox()
{
IfWinExist, PokerStars, Registered
WinClose, PokerStars, Registered
IfWinExist, PokerStars, Unregistered
WinClose, PokerStars, Unregistered
IfWinExist, PokerStars, Registration closed
WinClose, PokerStars, Registration closed
IfWinExist, PokerStars, Welcome to tournament
WinClose, PokerStars, Welcome to tournament
IfWinExist, PokerStars, You finished the tournament
WinClose, PokerStars, You finished the tournament
IfWinExist, PokerStars, You have won
WinClose, PokerStars, You have won
IfWinExist, PokerStars, You have been moved
WinClose, PokerStars, You have been moved
return
}


[/ QUOTE ]

I'm not sure if this works with the recent update, and you need to change the Functions.ahk to the directory where yours is. The script also raises to 2.5x when you right-click.
Reply With Quote