New script: PartySNGHelper
Hi.
I'm looking for a script that would push my chips in the middle via hotkey. I tried to "tune" some AHK scripts with no success. I suck, I know. Anyone? Please?
Edited title. -Sam
I'm looking for a script that would push my chips in the middle via hotkey. I tried to "tune" some AHK scripts with no success. I suck, I know. Anyone? Please?
Edited title. -Sam
Hi.
I'm looking for a script that would push my chips in the middle via hotkey. I tried to "tune" some AHK scripts with no success. I suck, I know. Anyone? Please?
I'm looking for a script that would push my chips in the middle via hotkey. I tried to "tune" some AHK scripts with no success. I suck, I know. Anyone? Please?
a) Add this function into the BetPot script:
; This will set the edit box to the maximum amount.
Push(id, autobet)
{
pot := 10000000
ControlSetText, Edit3, %pot%, ahk_id%id%
Sleep -1
Sleep, 50
WinSet, Redraw,, ahk_id%id%
If(autobet)
{
ControlClick, AfxWnd42u19, ahk_id%id%
}
}
b) Edit the hotkey section to look like this:
~MButton::
Push(getid(),0)
return
~RButton::
Fold(getid())
return
~WheelUp::
AlterAmount(getid(),"up")
return
~WheelDown::
AlterAmount(getid(),"down")
return
c) Enjoy the lack of arm strain!
After you set this up you can: fold by right clicking anywhere on the table, move the slider up/down 1 BB using the scroll wheel, and press down the scroll wheel to set the bet edit box to all-in.
If you want to have it then press raise for you automatically you just need to use Push(getid(),1) rather than Push(getid(),0).
Juk
You are on your way to heaven, Juk. Thank you!
Damnit. I can't get the MButton to work. If I change the PUSH button intp RButton it works fine.
I have some crappy Logitech wireless mouse. Any way to fix this?
I have some crappy Logitech wireless mouse. Any way to fix this?
Damnit. I can't get the MButton to work. If I change the PUSH button intp RButton it works fine.
I have some crappy Logitech wireless mouse. Any way to fix this?
I have some crappy Logitech wireless mouse. Any way to fix this?
I'm just in the process of making a single helper SNG script with code ripped from several scripts on the Overcards Wiki, which will do the following:
1. Push with/without autobet.
2. Check or fold (ie: check if we can, else fold).
3. Scroll wheel BB UP/Down.
4. Auto-confirm and check the buying box so all that will be needed is to click on an empty seat to join a SNG.
5. Auto-timebank clicker.
6. Auto-confirm the "Would you like a summary sent" box after being knocked out of a SNG.
I'm also using Roland's TableHighlighter2 script with the chatbox set to go Purple when we have an action pending, and flash Purple/Green when we have used 10+ seconds of time. I'm not sure if I can work out how to just rip the bits I want yet though.
I've got most of the code written now, but just need to test it out first - I'll post it later today.
Juk
Hey that script sounds fantastic. You might want to add (from DeMoster):
1. Auto-log-in to PP
2. PP pop-up killer
3. Auto-click-OK if you press fold when you can check
Also, these would be neat:
1. Auto close table (when you get knocked out)
2. Auto choose filter (Speed - Holdem - NL - Registering)
3. Auto rate Villain's range using PO/PT's database and auto call/fold/push
1. Auto-log-in to PP
2. PP pop-up killer
3. Auto-click-OK if you press fold when you can check
Also, these would be neat:
1. Auto close table (when you get knocked out)
2. Auto choose filter (Speed - Holdem - NL - Registering)
3. Auto rate Villain's range using PO/PT's database and auto call/fold/push
Here's my first attempt (I haven't worked out how to reuse the coloured chat box code yet though):
<font class="small">Code:</font><hr /><pre>;---------------------------------------------------------
;----------------- Party SNG Helper v1.00 ----------------
;---------------------------------------------------------
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: jukofyork (reused code and thanks to: _dave_ & Roland!)
; Features:
; =========
; 1. Push with/without autobet using middle mouse mutton.
; 2. Check or fold (ie: check if we can, else fold) using right mouse button.
; 3. Scroll wheel moved bet amount up/down in big bets.
; 4. Auto-confirm and check the buying box so all that will be needed is to click on an empty seat to join a SNG.
; 5. Auto-timebank clicker.
; 6. Auto-confirm the "Would you like a summary sent" box after being knocked out of a SNG.
#Persistent
#NoEnv
SendMode Input
SetTitleMatchMode 2
; Start the timers.
SetTimer, AutoClickTimeBank, 500
SetTimer, AutoBuyin, 500
SetTimer, AutoRequestSummary, 500
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
~RButton::
CheckFold(getid())
return
~MButton::
Push(getid(),1)
return
~WheelUp::
AlterAmount(getid(),"up")
return
~WheelDown::
AlterAmount(getid(),"down")
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AutoClickTimeBank:
checkfield = AfxWnd42u37 ; AfxWnd42u37 is timebank control
LobbyWindowTitle = Poker Lobby ; identify poker lobby substring
TableWindowTitle = Buy-in. ; identify pokertable substring
WinGet, lobbyID, ID, %LobbyWindowTitle%
WinGet, pid, PID, ahk_id%lobbyID%
WinGet, rlist, LIST, %TableWindowTitle% ahk_pid%pid%
Loop %rlist%
{
this_id := rlist%a_index%
If this_id != %lobbyID%
{
WinGetTitle, name, ahk_id%this_id%
ControlGet, result, Visible, , %checkfield%, ahk_id%this_id%
if (result)
{
ControlClick %checkfield%, ahk_id%this_id% ;Click timebank
}
}
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AutoBuyin:
IfWinExist, ahk_class #32770, Tournament Buy-in
{
WinGet, idList, List, ahk_class #32770, Tournament Buy-in
Loop, %idList%
{
winID := idList%a_index%
ControlSend, Button2, {SPACE}, ahk_id%winID%
Sleep, 40
ControlSend, Button5, {SPACE}, ahk_id%winID%
}
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AutoRequestSummary:
IfWinExist, ahk_class #32770, Would you like a tournament summary
{
WinGet, idList, List, ahk_class #32770, Would you like a tournament summary
Loop, %idList%
{
winID := idList%a_index%
ControlSend, Button1, {ENTER}, ahk_id%winID%
}
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
getid()
{
id := ""
MouseGetPos, , , id
return id
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
; This will set the edit box to the maximum amount.
Push(id, autobet=0)
{
pot := 10000000
ControlSetText, Edit3, %pot%, ahk_id%id%
Sleep -1
Sleep 50
WinSet, Redraw,, ahk_id%id%
If(autobet)
{
ControlClick, AfxWnd42u19, ahk_id%id%
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
; Clicks fold0in-turn button if sees it, else clicks check if sees it, else clicks fold.
CheckFold(id)
{
ControlGet, v, Visible, , AfxWnd42u22, ahk_id%id%
if (v)
{
ControlFocus, AfxWnd42u22, ahk_id%id%
Sleep, -1
ControlClick, AfxWnd42u22, ahk_id%id%
}
else
{
; Lets see if we can see the check button.
ControlGet, v, Visible, , AfxWnd42u18, ahk_id%id%
if (v)
{
ControlGetText, text, AfxWnd42u18, ahk_id%id%
IfInString, text, Check
{
ControlFocus, AfxWnd42u18, ahk_id%id%
Sleep, -1
ControlClick, AfxWnd42u18, ahk_id%id%
return ; Check found/clicked so Done.
}
}
; lets try for fold then.
ControlGet, v, Visible, , AfxWnd42u17, ahk_id%id%
if (v)
{
ControlFocus, AfxWnd42u17, ahk_id%id%
Sleep, -1
ControlClick, AfxWnd42u17, ahk_id%id%
}
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AlterAmount(id, dir="")
{
WinGetTitle, title, ahk_id%id%
amount := 0
; Get the current BB amount.
if (InStr(title, "NL") <> 0 AND InStr(title, "Buy-in") <> 0)
{
ControlGetText, text, Static6, ahk_id%id%
IfNotInString, text, Blinds-Antes
{
StringMid, bb, text, InStr(text, "/") + 1, InStr(text, ")") - InStr(text, "/") - 1
}
else
{
StringMid, bb, text, InStr(text, "/") + 1, InStr(text, "-","",InStr(text, "/")) - InStr(text, "/") - 1
}
;msgbox, %bb%
}
amount := bb
if (dir="down")
{
amount := amount - (2*amount)
}
ControlGetText, t, Edit3, ahk_id%id%
t := t + amount
if (t < 0)
{
t := 0
}
t := Round(t, 0)
ControlSetText, Edit3, %t%, ahk_id%id%
;WinSet, Redraw,, ahk_id%id%
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;</pre><hr />
(use "Quote" from the forum, then copy/paste the script from inside of it - this way it doesn't lose all the indentation).
After giving it a bit of a test I'll look into it - I was using like 4 scripts earlier, so my plan is to get all the bits useful for just Party SNGs into one script.
I agree, but I'm not sure how you can detect when you are no longer at the table? Any ideas (perhaps some of the checkboxes in the bottom left vanaish, so I could try that)?
Yep definitly, sick of setting those everytime why the [censored] can't Party just remember them?
I wish - there are some AHK snippets over at overcards which lets you access a PGSQL DB, but I think thats a bit beyond my AHK/DB skill...
Juk
<font class="small">Code:</font><hr /><pre>;---------------------------------------------------------
;----------------- Party SNG Helper v1.00 ----------------
;---------------------------------------------------------
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: jukofyork (reused code and thanks to: _dave_ & Roland!)
; Features:
; =========
; 1. Push with/without autobet using middle mouse mutton.
; 2. Check or fold (ie: check if we can, else fold) using right mouse button.
; 3. Scroll wheel moved bet amount up/down in big bets.
; 4. Auto-confirm and check the buying box so all that will be needed is to click on an empty seat to join a SNG.
; 5. Auto-timebank clicker.
; 6. Auto-confirm the "Would you like a summary sent" box after being knocked out of a SNG.
#Persistent
#NoEnv
SendMode Input
SetTitleMatchMode 2
; Start the timers.
SetTimer, AutoClickTimeBank, 500
SetTimer, AutoBuyin, 500
SetTimer, AutoRequestSummary, 500
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
~RButton::
CheckFold(getid())
return
~MButton::
Push(getid(),1)
return
~WheelUp::
AlterAmount(getid(),"up")
return
~WheelDown::
AlterAmount(getid(),"down")
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AutoClickTimeBank:
checkfield = AfxWnd42u37 ; AfxWnd42u37 is timebank control
LobbyWindowTitle = Poker Lobby ; identify poker lobby substring
TableWindowTitle = Buy-in. ; identify pokertable substring
WinGet, lobbyID, ID, %LobbyWindowTitle%
WinGet, pid, PID, ahk_id%lobbyID%
WinGet, rlist, LIST, %TableWindowTitle% ahk_pid%pid%
Loop %rlist%
{
this_id := rlist%a_index%
If this_id != %lobbyID%
{
WinGetTitle, name, ahk_id%this_id%
ControlGet, result, Visible, , %checkfield%, ahk_id%this_id%
if (result)
{
ControlClick %checkfield%, ahk_id%this_id% ;Click timebank
}
}
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AutoBuyin:
IfWinExist, ahk_class #32770, Tournament Buy-in
{
WinGet, idList, List, ahk_class #32770, Tournament Buy-in
Loop, %idList%
{
winID := idList%a_index%
ControlSend, Button2, {SPACE}, ahk_id%winID%
Sleep, 40
ControlSend, Button5, {SPACE}, ahk_id%winID%
}
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AutoRequestSummary:
IfWinExist, ahk_class #32770, Would you like a tournament summary
{
WinGet, idList, List, ahk_class #32770, Would you like a tournament summary
Loop, %idList%
{
winID := idList%a_index%
ControlSend, Button1, {ENTER}, ahk_id%winID%
}
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
getid()
{
id := ""
MouseGetPos, , , id
return id
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
; This will set the edit box to the maximum amount.
Push(id, autobet=0)
{
pot := 10000000
ControlSetText, Edit3, %pot%, ahk_id%id%
Sleep -1
Sleep 50
WinSet, Redraw,, ahk_id%id%
If(autobet)
{
ControlClick, AfxWnd42u19, ahk_id%id%
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
; Clicks fold0in-turn button if sees it, else clicks check if sees it, else clicks fold.
CheckFold(id)
{
ControlGet, v, Visible, , AfxWnd42u22, ahk_id%id%
if (v)
{
ControlFocus, AfxWnd42u22, ahk_id%id%
Sleep, -1
ControlClick, AfxWnd42u22, ahk_id%id%
}
else
{
; Lets see if we can see the check button.
ControlGet, v, Visible, , AfxWnd42u18, ahk_id%id%
if (v)
{
ControlGetText, text, AfxWnd42u18, ahk_id%id%
IfInString, text, Check
{
ControlFocus, AfxWnd42u18, ahk_id%id%
Sleep, -1
ControlClick, AfxWnd42u18, ahk_id%id%
return ; Check found/clicked so Done.
}
}
; lets try for fold then.
ControlGet, v, Visible, , AfxWnd42u17, ahk_id%id%
if (v)
{
ControlFocus, AfxWnd42u17, ahk_id%id%
Sleep, -1
ControlClick, AfxWnd42u17, ahk_id%id%
}
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AlterAmount(id, dir="")
{
WinGetTitle, title, ahk_id%id%
amount := 0
; Get the current BB amount.
if (InStr(title, "NL") <> 0 AND InStr(title, "Buy-in") <> 0)
{
ControlGetText, text, Static6, ahk_id%id%
IfNotInString, text, Blinds-Antes
{
StringMid, bb, text, InStr(text, "/") + 1, InStr(text, ")") - InStr(text, "/") - 1
}
else
{
StringMid, bb, text, InStr(text, "/") + 1, InStr(text, "-","",InStr(text, "/")) - InStr(text, "/") - 1
}
;msgbox, %bb%
}
amount := bb
if (dir="down")
{
amount := amount - (2*amount)
}
ControlGetText, t, Edit3, ahk_id%id%
t := t + amount
if (t < 0)
{
t := 0
}
t := Round(t, 0)
ControlSetText, Edit3, %t%, ahk_id%id%
;WinSet, Redraw,, ahk_id%id%
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;</pre><hr />
(use "Quote" from the forum, then copy/paste the script from inside of it - this way it doesn't lose all the indentation).
Hey that script sounds fantastic. You might want to add (from DeMoster):
1. Auto-log-in to PP
2. PP pop-up killer
3. Auto-click-OK if you press fold when you can check
1. Auto-log-in to PP
2. PP pop-up killer
3. Auto-click-OK if you press fold when you can check
1. Auto close table (when you get knocked out)
2. Auto choose filter (Speed - Holdem - NL - Registering)
3. Auto rate Villain's range using PO/PT's database and auto call/fold/push
Juk
Okay I used tested script. Worked good I have few suggestions if you dont mind.
1. When in BB when I click RButton it would be neat if it checked the "Check/Fold" button and not the "Fold".
2. How do I make notes when I can't right click?
3. From level 3 on I make the initial bet 2,5xBB. Any solution to that?
When it comes to automatically closing the tables (when finished)... the checkboxes for "auto post blind", "muck losing hands" and "deal me out" disappear. Could you work on from that?
1. When in BB when I click RButton it would be neat if it checked the "Check/Fold" button and not the "Fold".
2. How do I make notes when I can't right click?
3. From level 3 on I make the initial bet 2,5xBB. Any solution to that?
When it comes to automatically closing the tables (when finished)... the checkboxes for "auto post blind", "muck losing hands" and "deal me out" disappear. Could you work on from that?
Okay I used tested script. Worked good I have few suggestions if you dont mind.
1. When in BB when I click RButton it would be neat if it checked the "Check/Fold" button and not the "Fold".
2. How do I make notes when I can't right click?
3. From level 3 on I make the initial bet 2,5xBB. Any solution to that?
amount := (bb / 2)
.
.
.
t := Round(t, 1)
4. When it comes to automatically closing the tables (when finished)... the checkboxes for "auto post blind", "muck losing hands" and "deal me out" disappear. Could you work on from that?
I'll have a go at implementing these now and see how I get on.
Juk
Okay I used tested script. Worked good I have few suggestions if you dont mind.
1. When in BB when I click RButton it would be neat if it checked the "Check/Fold" button and not the "Fold".
2. How do I make notes when I can't right click?
3. From level 3 on I make the initial bet 2,5xBB. Any solution to that?
amount := (bb / 2)
.
.
.
t := Round(t, 1)
4. When it comes to automatically closing the tables (when finished)... the checkboxes for "auto post blind", "muck losing hands" and "deal me out" disappear. Could you work on from that?
I'll have a go at implementing these now and see how I get on.
* F12 does the "fake" right mouse click to allow for note taking.
* You might want to set "increment_half_bb = 1" so you can increment the slider in 0.5BB amounts.
<font class="small">Code:</font><hr /><pre>;---------------------------------------------------------
;----------------- Party SNG Helper v1.01 ----------------
;---------------------------------------------------------
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: jukofyork (reused code and thanks to: _dave_ & Roland!)
; Features:
; =========
; 1. Push with/without autobet using middle mouse mutton.
; 2. Check or fold (ie: check if we can, else fold) using right mouse button.
; 3. Scroll wheel moved bet amount up/down in big bets.
; 4. Auto-confirm and check the buying box so all that will be needed is to click on an empty seat to join a SNG.
; 5. Auto-timebank clicker.
; 6. Auto-confirm the "Would you like a summary sent" box after being knocked out of a SNG.
; New for v1.01:
; ==============
; 1. Now will click Check/Fold checkbox if visible.
; 2. Pressing F12 over a player's name will simulate a right mouse click so we can takes notes, etc.
; 3. Have made it so that AlterAmount amount can take another argument to increment in 0.5BB amounts.
; 4. Have made it so we will close finished SNGs.
; 5. Have changed the timings to be 1000ms rather than 500ms to try to save on CPU time.
#Persistent
#NoEnv
SendMode Input
SetTitleMatchMode 2
; Set the options.
autobet = 1 ; Do we want to actually hit raise after we set the edit box to all-in?
increment_half_bb = 0 ; Set this to use 0.5BB increments with the scroll wheel, rather than 1BB.
; Start the timers.
SetTimer, AutoClickTimeBank, 1000
SetTimer, AutoBuyin, 1000
SetTimer, AutoRequestSummaryAndCloseFinishedSNGs, 1000
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
~F12::
id := ""
MouseGetPos, x, y, id
if (id <> "")
PostRightClick(x, y, id)
return
~RButton::
CheckFold(getid())
return
~MButton::
Push(getid(),autobet)
return
~WheelUp::
AlterAmount(getid(),"up",increment_half_bb)
return
~WheelDown::
AlterAmount(getid(),"down",increment_half_bb)
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AutoClickTimeBank:
checkfield = AfxWnd42u37 ; AfxWnd42u37 is timebank control
LobbyWindowTitle = Poker Lobby ; identify poker lobby substring
TableWindowTitle = Buy-in. ; identify pokertable substring
WinGet, lobbyID, ID, %LobbyWindowTitle%
WinGet, pid, PID, ahk_id%lobbyID%
WinGet, rlist, LIST, %TableWindowTitle% ahk_pid%pid%
Loop %rlist%
{
this_id := rlist%a_index%
If this_id != %lobbyID%
{
WinGetTitle, name, ahk_id%this_id%
ControlGet, result, Visible, , %checkfield%, ahk_id%this_id%
if (result)
{
ControlClick %checkfield%, ahk_id%this_id% ;Click timebank
}
}
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AutoBuyin:
IfWinExist, ahk_class #32770, Tournament Buy-in
{
WinGet, idList, List, ahk_class #32770, Tournament Buy-in
Loop, %idList%
{
winID := idList%a_index%
ControlSend, Button2, {SPACE}, ahk_id%winID%
Sleep, 40
ControlSend, Button5, {SPACE}, ahk_id%winID%
}
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AutoRequestSummaryAndCloseFinishedSNGs:
; Lets try requesting the summary BEFORE we try closing the table.
IfWinExist, ahk_class #32770, Would you like a tournament summary
{
WinGet, idList, List, ahk_class #32770, Would you like a tournament summary
Loop, %idList%
{
winID := idList%a_index%
ControlSend, Button1, {ENTER}, ahk_id%winID%
}
}
; Now lets try closing the SNGs.
checkfield = Button3 ; Button3 is the "Auto Post Blind" checkbox.
LobbyWindowTitle = Poker Lobby ; identify poker lobby substring
TableWindowTitle = Buy-in. ; identify pokertable substring
WinGet, lobbyID, ID, %LobbyWindowTitle%
WinGet, pid, PID, ahk_id%lobbyID%
WinGet, rlist, LIST, %TableWindowTitle% ahk_pid%pid%
Loop %rlist%
{
this_id := rlist%a_index%
If this_id != %lobbyID%
{
WinGetTitle, name, ahk_id%this_id%
; Make sure we are not seating.
ControlGet, result, Visible, , Seat Open, ahk_id%this_id%
if (result = 0)
{
; Is it not visible?
ControlGet, result, Visible, , %checkfield%, ahk_id%this_id%
if (result = 0)
{
; Lets make 100% sure and try again incase of a graphics delay.
Sleep, 150
ControlGet, result, Visible, , %checkfield%, ahk_id%this_id%
if (result = 0)
{
WinClose, ahk_id%this_id% ; Close the table.
}
}
}
}
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
getid()
{
id := ""
MouseGetPos, , , id
return id
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
PostRightClick(x, y, table_id, activate=1) {
; ### JUK: Send the down left click, then the mouse-up messages.
; NOTE: This is relative to the top left of the client area and NOT the top left of the
; window (ie: It *doesn't* include the title-bar like AHK's MouseClick does!!!).
If activate
WinActivate, ahk_id%table_id%
PostMessage, 0x204, 0x0001, ((y<<16)^x), , ahk_id%table_id%
PostMessage, 0x205 , 0, ((y<<16)^x), , ahk_id%table_id%
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
; This will set the edit box to the maximum amount.
Push(id, autobet=0)
{
pot := 10000000
ControlSetText, Edit3, %pot%, ahk_id%id%
Sleep -1
Sleep 50
WinSet, Redraw,, ahk_id%id%
If(autobet)
{
ControlClick, AfxWnd42u19, ahk_id%id%
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
; Clicks Check/Fold-in-turn or fold-in-turn button if sees it, else clicks check if sees
; it, else clicks fold.
CheckFold(id)
{
; Check/Fold checkbox.
ControlGet, v, Visible, , AfxWnd42u23, ahk_id%id%
if (v)
{
ControlFocus, AfxWnd42u23, ahk_id%id%
Sleep, -1
ControlClick, AfxWnd42u23, ahk_id%id%
return
}
; Fold checkbox.
ControlGet, v, Visible, , AfxWnd42u22, ahk_id%id%
if (v)
{
ControlFocus, AfxWnd42u22, ahk_id%id%
Sleep, -1
ControlClick, AfxWnd42u22, ahk_id%id%
return
}
; Lets see if we can see the check button.
ControlGet, v, Visible, , AfxWnd42u18, ahk_id%id%
if (v)
{
ControlGetText, text, AfxWnd42u18, ahk_id%id%
IfInString, text, Check
{
ControlFocus, AfxWnd42u18, ahk_id%id%
Sleep, -1
ControlClick, AfxWnd42u18, ahk_id%id%
return
}
}
; Lets try for fold then.
ControlGet, v, Visible, , AfxWnd42u17, ahk_id%id%
if (v)
{
ControlFocus, AfxWnd42u17, ahk_id%id%
Sleep, -1
ControlClick, AfxWnd42u17, ahk_id%id%
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AlterAmount(id, dir="",increment_half_bb=1)
{
WinGetTitle, title, ahk_id%id%
amount := 0
; Get the current BB amount.
if (InStr(title, "NL") <> 0 AND InStr(title, "Buy-in") <> 0)
{
ControlGetText, text, Static6, ahk_id%id%
IfNotInString, text, Blinds-Antes
{
StringMid, bb, text, InStr(text, "/") + 1, InStr(text, ")") - InStr(text, "/") - 1
}
else
{
StringMid, bb, text, InStr(text, "/") + 1, InStr(text, "-","",InStr(text, "/")) - InStr(text, "/") - 1
}
;msgbox, %bb%
}
; Do we want to increment by a whole or a half BB?
if (increment_half_bb = 1)
amount := bb / 2
else
amount := bb
if (dir="down")
{
amount := amount - (2*amount)
}
ControlGetText, t, Edit3, ahk_id%id%
t := t + amount
if (t < 0)
{
t := 0
}
; Lets round to 0DP or 1DP.
if (increment_half_bb = 1)
t := Round(t, 1)
else
t := Round(t, 0)
; Alter the edit-box.
ControlSetText, Edit3, %t%, ahk_id%id%
;WinSet, Redraw,, ahk_id%id%
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;</pre><hr />
Tell us how you get on with it, as I've not tested it all that well yet and just about to get something to eat before starting playing again.
Juk
EDIT: Fixed a bug where I was forgetting to check if we were seating causing the tables to get closed as soon as we opened them.
Bleh, the "Seat Empty" thing still didn't work properly and my edit time has expired now. Here's the fixed version:
<font class="small">Code:</font><hr /><pre>;---------------------------------------------------------
;----------------- Party SNG Helper v1.01 ----------------
;---------------------------------------------------------
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: jukofyork (reused code and thanks to: _dave_ & Roland!)
; Features:
; =========
; 1. Push with/without autobet using middle mouse mutton.
; 2. Check or fold (ie: check if we can, else fold) using right mouse button.
; 3. Scroll wheel moved bet amount up/down in big bets.
; 4. Auto-confirm and check the buying box so all that will be needed is to click on an empty seat to join a SNG.
; 5. Auto-timebank clicker.
; 6. Auto-confirm the "Would you like a summary sent" box after being knocked out of a SNG.
; New for v1.01:
; ==============
; 1. Now will click Check/Fold checkbox if visible.
; 2. Pressing F12 over a player's name will simulate a right mouse click so we can takes notes, etc.
; 3. Have made it so that AlterAmount amount can take another argument to increment in 0.5BB amounts.
; 4. Have made it so we will close finished SNGs.
; 5. Have changed the timings to be 1000ms rather than 500ms to try to save on CPU time.
#Persistent
#NoEnv
SendMode Input
SetTitleMatchMode 2
; Set the options.
autobet = 1 ; Do we want to actually hit raise after we set the edit box to all-in?
increment_half_bb = 0 ; Set this to use 0.5BB increments with the scroll wheel, rather than 1BB.
; Start the timers.
SetTimer, AutoClickTimeBank, 1000
SetTimer, AutoBuyin, 1000
SetTimer, AutoRequestSummaryAndCloseFinishedSNGs, 1000
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
~F12::
id := ""
MouseGetPos, x, y, id
if (id <> "")
PostRightClick(x, y, id)
return
~RButton::
CheckFold(getid())
return
~MButton::
Push(getid(),autobet)
return
~WheelUp::
AlterAmount(getid(),"up",increment_half_bb)
return
~WheelDown::
AlterAmount(getid(),"down",increment_half_bb)
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AutoClickTimeBank:
checkfield = AfxWnd42u37 ; AfxWnd42u37 is timebank control
LobbyWindowTitle = Poker Lobby ; identify poker lobby substring
TableWindowTitle = Buy-in. ; identify pokertable substring
WinGet, lobbyID, ID, %LobbyWindowTitle%
WinGet, pid, PID, ahk_id%lobbyID%
WinGet, rlist, LIST, %TableWindowTitle% ahk_pid%pid%
Loop %rlist%
{
this_id := rlist%a_index%
If this_id != %lobbyID%
{
WinGetTitle, name, ahk_id%this_id%
ControlGet, result, Visible, , %checkfield%, ahk_id%this_id%
if (result)
{
ControlClick %checkfield%, ahk_id%this_id% ;Click timebank
}
}
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AutoBuyin:
IfWinExist, ahk_class #32770, Tournament Buy-in
{
WinGet, idList, List, ahk_class #32770, Tournament Buy-in
Loop, %idList%
{
winID := idList%a_index%
ControlSend, Button2, {SPACE}, ahk_id%winID%
Sleep, 40
ControlSend, Button5, {SPACE}, ahk_id%winID%
}
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AutoRequestSummaryAndCloseFinishedSNGs:
; Lets try requesting the summary BEFORE we try closing the table.
IfWinExist, ahk_class #32770, Would you like a tournament summary
{
WinGet, idList, List, ahk_class #32770, Would you like a tournament summary
Loop, %idList%
{
winID := idList%a_index%
ControlSend, Button1, {ENTER}, ahk_id%winID%
}
}
; Now lets try closing the SNGs.
checkfield = Button3 ; Button3 is the "Auto Post Blind" checkbox.
LobbyWindowTitle = Poker Lobby ; identify poker lobby substring
TableWindowTitle = Buy-in. ; identify pokertable substring
WinGet, lobbyID, ID, %LobbyWindowTitle%
WinGet, pid, PID, ahk_id%lobbyID%
WinGet, rlist, LIST, %TableWindowTitle% ahk_pid%pid%
Loop %rlist%
{
this_id := rlist%a_index%
If this_id != %lobbyID%
{
WinGetTitle, name, ahk_id%this_id%
; Go through all the "Seat Open" buttons.
seats = 0
i = 3
Loop, 10
{
i++
;If they're visible, this is an empty seat.
ControlGet, is_visible, Visible, , AfxWnd42u%i%, ahk_id%this_id%
If is_visible = 1
seats++
}
; Are we not seating and is the "Auto Post Blind" checkbox not visible?
ControlGet, result, Visible, , %checkfield%, ahk_id%this_id%
if (seats = 0 AND result = 0)
{
; Lets make 100% sure and try again incase of a graphics delay.
Sleep, 150
ControlGet, result, Visible, , %checkfield%, ahk_id%this_id%
if (result = 0)
{
WinClose, ahk_id%this_id% ; Close the table.
}
}
}
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
getid()
{
id := ""
MouseGetPos, , , id
return id
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
PostRightClick(x, y, table_id, activate=1) {
; ### JUK: Send the down left click, then the mouse-up messages.
; NOTE: This is relative to the top left of the client area and NOT the top left of the
; window (ie: It *doesn't* include the title-bar like AHK's MouseClick does!!!).
If activate
WinActivate, ahk_id%table_id%
PostMessage, 0x204, 0x0001, ((y<<16)^x), , ahk_id%table_id%
PostMessage, 0x205 , 0, ((y<<16)^x), , ahk_id%table_id%
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
; This will set the edit box to the maximum amount.
Push(id, autobet=0)
{
pot := 10000000
ControlSetText, Edit3, %pot%, ahk_id%id%
Sleep -1
Sleep 50
WinSet, Redraw,, ahk_id%id%
If(autobet)
{
ControlClick, AfxWnd42u19, ahk_id%id%
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
; Clicks Check/Fold-in-turn or fold-in-turn button if sees it, else clicks check if sees
; it, else clicks fold.
CheckFold(id)
{
; Check/Fold checkbox.
ControlGet, v, Visible, , AfxWnd42u23, ahk_id%id%
if (v)
{
ControlFocus, AfxWnd42u23, ahk_id%id%
Sleep, -1
ControlClick, AfxWnd42u23, ahk_id%id%
return
}
; Fold checkbox.
ControlGet, v, Visible, , AfxWnd42u22, ahk_id%id%
if (v)
{
ControlFocus, AfxWnd42u22, ahk_id%id%
Sleep, -1
ControlClick, AfxWnd42u22, ahk_id%id%
return
}
; Lets see if we can see the check button.
ControlGet, v, Visible, , AfxWnd42u18, ahk_id%id%
if (v)
{
ControlGetText, text, AfxWnd42u18, ahk_id%id%
IfInString, text, Check
{
ControlFocus, AfxWnd42u18, ahk_id%id%
Sleep, -1
ControlClick, AfxWnd42u18, ahk_id%id%
return
}
}
; Lets try for fold then.
ControlGet, v, Visible, , AfxWnd42u17, ahk_id%id%
if (v)
{
ControlFocus, AfxWnd42u17, ahk_id%id%
Sleep, -1
ControlClick, AfxWnd42u17, ahk_id%id%
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AlterAmount(id, dir="",increment_half_bb=1)
{
WinGetTitle, title, ahk_id%id%
amount := 0
; Get the current BB amount.
if (InStr(title, "NL") <> 0 AND InStr(title, "Buy-in") <> 0)
{
ControlGetText, text, Static6, ahk_id%id%
IfNotInString, text, Blinds-Antes
{
StringMid, bb, text, InStr(text, "/") + 1, InStr(text, ")") - InStr(text, "/") - 1
}
else
{
StringMid, bb, text, InStr(text, "/") + 1, InStr(text, "-","",InStr(text, "/")) - InStr(text, "/") - 1
}
;msgbox, %bb%
}
; Do we want to increment by a whole or a half BB?
if (increment_half_bb = 1)
amount := bb / 2
else
amount := bb
if (dir="down")
{
amount := amount - (2*amount)
}
ControlGetText, t, Edit3, ahk_id%id%
t := t + amount
if (t < 0)
{
t := 0
}
; Lets round to 0DP or 1DP.
if (increment_half_bb = 1)
t := Round(t, 1)
else
t := Round(t, 0)
; Alter the edit-box.
ControlSetText, Edit3, %t%, ahk_id%id%
;WinSet, Redraw,, ahk_id%id%
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;</pre><hr />
Juk
<font class="small">Code:</font><hr /><pre>;---------------------------------------------------------
;----------------- Party SNG Helper v1.01 ----------------
;---------------------------------------------------------
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: jukofyork (reused code and thanks to: _dave_ & Roland!)
; Features:
; =========
; 1. Push with/without autobet using middle mouse mutton.
; 2. Check or fold (ie: check if we can, else fold) using right mouse button.
; 3. Scroll wheel moved bet amount up/down in big bets.
; 4. Auto-confirm and check the buying box so all that will be needed is to click on an empty seat to join a SNG.
; 5. Auto-timebank clicker.
; 6. Auto-confirm the "Would you like a summary sent" box after being knocked out of a SNG.
; New for v1.01:
; ==============
; 1. Now will click Check/Fold checkbox if visible.
; 2. Pressing F12 over a player's name will simulate a right mouse click so we can takes notes, etc.
; 3. Have made it so that AlterAmount amount can take another argument to increment in 0.5BB amounts.
; 4. Have made it so we will close finished SNGs.
; 5. Have changed the timings to be 1000ms rather than 500ms to try to save on CPU time.
#Persistent
#NoEnv
SendMode Input
SetTitleMatchMode 2
; Set the options.
autobet = 1 ; Do we want to actually hit raise after we set the edit box to all-in?
increment_half_bb = 0 ; Set this to use 0.5BB increments with the scroll wheel, rather than 1BB.
; Start the timers.
SetTimer, AutoClickTimeBank, 1000
SetTimer, AutoBuyin, 1000
SetTimer, AutoRequestSummaryAndCloseFinishedSNGs, 1000
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
~F12::
id := ""
MouseGetPos, x, y, id
if (id <> "")
PostRightClick(x, y, id)
return
~RButton::
CheckFold(getid())
return
~MButton::
Push(getid(),autobet)
return
~WheelUp::
AlterAmount(getid(),"up",increment_half_bb)
return
~WheelDown::
AlterAmount(getid(),"down",increment_half_bb)
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AutoClickTimeBank:
checkfield = AfxWnd42u37 ; AfxWnd42u37 is timebank control
LobbyWindowTitle = Poker Lobby ; identify poker lobby substring
TableWindowTitle = Buy-in. ; identify pokertable substring
WinGet, lobbyID, ID, %LobbyWindowTitle%
WinGet, pid, PID, ahk_id%lobbyID%
WinGet, rlist, LIST, %TableWindowTitle% ahk_pid%pid%
Loop %rlist%
{
this_id := rlist%a_index%
If this_id != %lobbyID%
{
WinGetTitle, name, ahk_id%this_id%
ControlGet, result, Visible, , %checkfield%, ahk_id%this_id%
if (result)
{
ControlClick %checkfield%, ahk_id%this_id% ;Click timebank
}
}
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AutoBuyin:
IfWinExist, ahk_class #32770, Tournament Buy-in
{
WinGet, idList, List, ahk_class #32770, Tournament Buy-in
Loop, %idList%
{
winID := idList%a_index%
ControlSend, Button2, {SPACE}, ahk_id%winID%
Sleep, 40
ControlSend, Button5, {SPACE}, ahk_id%winID%
}
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AutoRequestSummaryAndCloseFinishedSNGs:
; Lets try requesting the summary BEFORE we try closing the table.
IfWinExist, ahk_class #32770, Would you like a tournament summary
{
WinGet, idList, List, ahk_class #32770, Would you like a tournament summary
Loop, %idList%
{
winID := idList%a_index%
ControlSend, Button1, {ENTER}, ahk_id%winID%
}
}
; Now lets try closing the SNGs.
checkfield = Button3 ; Button3 is the "Auto Post Blind" checkbox.
LobbyWindowTitle = Poker Lobby ; identify poker lobby substring
TableWindowTitle = Buy-in. ; identify pokertable substring
WinGet, lobbyID, ID, %LobbyWindowTitle%
WinGet, pid, PID, ahk_id%lobbyID%
WinGet, rlist, LIST, %TableWindowTitle% ahk_pid%pid%
Loop %rlist%
{
this_id := rlist%a_index%
If this_id != %lobbyID%
{
WinGetTitle, name, ahk_id%this_id%
; Go through all the "Seat Open" buttons.
seats = 0
i = 3
Loop, 10
{
i++
;If they're visible, this is an empty seat.
ControlGet, is_visible, Visible, , AfxWnd42u%i%, ahk_id%this_id%
If is_visible = 1
seats++
}
; Are we not seating and is the "Auto Post Blind" checkbox not visible?
ControlGet, result, Visible, , %checkfield%, ahk_id%this_id%
if (seats = 0 AND result = 0)
{
; Lets make 100% sure and try again incase of a graphics delay.
Sleep, 150
ControlGet, result, Visible, , %checkfield%, ahk_id%this_id%
if (result = 0)
{
WinClose, ahk_id%this_id% ; Close the table.
}
}
}
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
getid()
{
id := ""
MouseGetPos, , , id
return id
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
PostRightClick(x, y, table_id, activate=1) {
; ### JUK: Send the down left click, then the mouse-up messages.
; NOTE: This is relative to the top left of the client area and NOT the top left of the
; window (ie: It *doesn't* include the title-bar like AHK's MouseClick does!!!).
If activate
WinActivate, ahk_id%table_id%
PostMessage, 0x204, 0x0001, ((y<<16)^x), , ahk_id%table_id%
PostMessage, 0x205 , 0, ((y<<16)^x), , ahk_id%table_id%
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
; This will set the edit box to the maximum amount.
Push(id, autobet=0)
{
pot := 10000000
ControlSetText, Edit3, %pot%, ahk_id%id%
Sleep -1
Sleep 50
WinSet, Redraw,, ahk_id%id%
If(autobet)
{
ControlClick, AfxWnd42u19, ahk_id%id%
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
; Clicks Check/Fold-in-turn or fold-in-turn button if sees it, else clicks check if sees
; it, else clicks fold.
CheckFold(id)
{
; Check/Fold checkbox.
ControlGet, v, Visible, , AfxWnd42u23, ahk_id%id%
if (v)
{
ControlFocus, AfxWnd42u23, ahk_id%id%
Sleep, -1
ControlClick, AfxWnd42u23, ahk_id%id%
return
}
; Fold checkbox.
ControlGet, v, Visible, , AfxWnd42u22, ahk_id%id%
if (v)
{
ControlFocus, AfxWnd42u22, ahk_id%id%
Sleep, -1
ControlClick, AfxWnd42u22, ahk_id%id%
return
}
; Lets see if we can see the check button.
ControlGet, v, Visible, , AfxWnd42u18, ahk_id%id%
if (v)
{
ControlGetText, text, AfxWnd42u18, ahk_id%id%
IfInString, text, Check
{
ControlFocus, AfxWnd42u18, ahk_id%id%
Sleep, -1
ControlClick, AfxWnd42u18, ahk_id%id%
return
}
}
; Lets try for fold then.
ControlGet, v, Visible, , AfxWnd42u17, ahk_id%id%
if (v)
{
ControlFocus, AfxWnd42u17, ahk_id%id%
Sleep, -1
ControlClick, AfxWnd42u17, ahk_id%id%
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;
AlterAmount(id, dir="",increment_half_bb=1)
{
WinGetTitle, title, ahk_id%id%
amount := 0
; Get the current BB amount.
if (InStr(title, "NL") <> 0 AND InStr(title, "Buy-in") <> 0)
{
ControlGetText, text, Static6, ahk_id%id%
IfNotInString, text, Blinds-Antes
{
StringMid, bb, text, InStr(text, "/") + 1, InStr(text, ")") - InStr(text, "/") - 1
}
else
{
StringMid, bb, text, InStr(text, "/") + 1, InStr(text, "-","",InStr(text, "/")) - InStr(text, "/") - 1
}
;msgbox, %bb%
}
; Do we want to increment by a whole or a half BB?
if (increment_half_bb = 1)
amount := bb / 2
else
amount := bb
if (dir="down")
{
amount := amount - (2*amount)
}
ControlGetText, t, Edit3, ahk_id%id%
t := t + amount
if (t < 0)
{
t := 0
}
; Lets round to 0DP or 1DP.
if (increment_half_bb = 1)
t := Round(t, 1)
else
t := Round(t, 0)
; Alter the edit-box.
ControlSetText, Edit3, %t%, ahk_id%id%
;WinSet, Redraw,, ahk_id%id%
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;</pre><hr />
Juk
After few sets the newest version works like a charm. Havent tried the 0.5xBB yet though. All I need now is a script that gives a spite call warning.
Thanks for the script! Which level you play, Juk?
Thanks for the script! Which level you play, Juk?
After few sets the newest version works like a charm. Havent tried the 0.5xBB yet though. All I need now is a script that gives a spite call warning.
Thanks for the script! Which level you play, Juk?
So far my impression of the 11s is VERY juicy: I lost my net connection last week while playing 9 at various stages and was severely upset to say the least (hence got dual connections now), BUT when I woke up in the morning I couldn't work out how come I'd only lost $19. After looking at the Party account page, I saw I'd come 3rd in 4/9 of them!!!
Juk
Okay I run into really annoying problem.
I use PartyPlanner and I 12-table with slight overlap. Today the tables started popping up like a [censored] pinball table (pinball tables pop up?). They moved on top of each other every time when there was action (any movement) on the table. So I had to shut down the script. What might cause this? Anyway to prevent this?
I use PartyPlanner and I 12-table with slight overlap. Today the tables started popping up like a [censored] pinball table (pinball tables pop up?). They moved on top of each other every time when there was action (any movement) on the table. So I had to shut down the script. What might cause this? Anyway to prevent this?
Okay I run into really annoying problem.
I use PartyPlanner and I 12-table with slight overlap. Today the tables started popping up like a [censored] pinball table (pinball tables pop up?). They moved on top of each other every time when there was action (any movement) on the table. So I had to shut down the script. What might cause this? Anyway to prevent this?
I use PartyPlanner and I 12-table with slight overlap. Today the tables started popping up like a [censored] pinball table (pinball tables pop up?). They moved on top of each other every time when there was action (any movement) on the table. So I had to shut down the script. What might cause this? Anyway to prevent this?
I'll have to have another go at writing the table auto-close code to be safer (it didn't even work properly when I checked 10 times in a row if I wasn't at the table).
Juk
Okay I run into really annoying problem.
I use PartyPlanner and I 12-table with slight overlap. Today the tables started popping up like a [censored] pinball table (pinball tables pop up?). They moved on top of each other every time when there was action (any movement) on the table. So I had to shut down the script. What might cause this? Anyway to prevent this?
I use PartyPlanner and I 12-table with slight overlap. Today the tables started popping up like a [censored] pinball table (pinball tables pop up?). They moved on top of each other every time when there was action (any movement) on the table. So I had to shut down the script. What might cause this? Anyway to prevent this?
I'll have to have another go at writing the table auto-close code to be safer (it didn't even work properly when I checked 10 times in a row if I wasn't at the table).
Juk
For some reason it stopped doing the pinball thing. I did nothing different. Then, it started again. Then it stopped. Bleh. I quess I can live with it since my ROI% at the 22s is 137% after I started using this piece of software. Sustainable?
I'm having problemos with the auto-closer. But only when I'm starting my set.
Can I disable the auto-closet from the script and run it as a separate script after after I've gotten all my tables open?
Can I disable the auto-closet from the script and run it as a separate script after after I've gotten all my tables open?
For some reason it stopped doing the pinball thing. I did nothing different. Then, it started again. Then it stopped. Bleh. I quess I can live with it since my ROI% at the 22s is 137% after I started using this piece of software. Sustainable?
I've been having problems with Party planner, so the table flashing thing could be something to do with it mixed with PartyPlanner (I've adapted _dave_'s StarsPlanner to work at Party now).
I'm having problemos with the auto-closer. But only when I'm starting my set.
Can I disable the auto-closet from the script and run it as a separate script after after I've gotten all my tables open?
Can I disable the auto-closet from the script and run it as a separate script after after I've gotten all my tables open?
To use it alone you just need to make a small script like this:
<font class="small">Code:</font><hr /><pre>
#Persistent
#NoEnv
SendMode Input
SetTitleMatchMode 2
SetTimer, AutoCloseFinishedSNGs, 1000
return
AutoCloseFinishedSNGs:
; Now lets try closing the SNGs.
checkfield = Button3 ; Button3 is the "Auto Post Blind" checkbox.
LobbyWindowTitle = Poker Lobby ; identify poker lobby substring
TableWindowTitle = Buy-in. ; identify pokertable substring
WinGet, lobbyID, ID, %LobbyWindowTitle%
WinGet, pid, PID, ahk_id%lobbyID%
WinGet, rlist, LIST, %TableWindowTitle% ahk_pid%pid%
Loop %rlist%
{
this_id := rlist%a_index%
If this_id != %lobbyID%
{
WinGetTitle, name, ahk_id%this_id%
; Make sure we are not seating.
ControlGet, result, Visible, , Seat Open, ahk_id%this_id%
if (result = 0)
{
; Is it not visible?
ControlGet, result, Visible, , %checkfield%, ahk_id%this_id%
if (result = 0)
{
; Lets make 100% sure and try again incase of a graphics delay.
Sleep, 150
ControlGet, result, Visible, , %checkfield%, ahk_id%this_id%
if (result = 0)
{
WinClose, ahk_id%this_id% ; Close the table.
}
}
}
}
}
return</pre><hr />
You can also right click on it's taskbar icon and use "Pause Script" to turn it on/off.
Juk
This is priceless, ty. Btw I'm still running four scripts.
1. DeMonster (kills the pop-ups, jackpot tables and does all sorts of neat little stuff)
2. PartySNGhelper
3. PartyPlanner (works better for me than the dave's one)
4. Auto close script
Turbojunge once wrote an auto-SNG-opener (it wasn't open source). I bought it, he abandoned it, i hated him for that. I wonder if one could be made again?
1. DeMonster (kills the pop-ups, jackpot tables and does all sorts of neat little stuff)
2. PartySNGhelper
3. PartyPlanner (works better for me than the dave's one)
4. Auto close script
Turbojunge once wrote an auto-SNG-opener (it wasn't open source). I bought it, he abandoned it, i hated him for that. I wonder if one could be made again?
Turbojunge once wrote an auto-SNG-opener (it wasn't open source). I bought it, he abandoned it, i hated him for that. I wonder if one could be made again?
I will put it online when I get home from work (~3 hours) and check it still works OK.
I was unaware the old one was broken / abandoned, or I'd have published my Free AHK one already...
Some very nice work you have done here Juk - I have a few comments, but I'll save them until I get home since I'm not really suposed to be posting here while "working" lol.
EDIT: and Juk - have you seen this thread yet? code worth checking out I'd think...
dave.
This is priceless, ty. Btw I'm still running four scripts.
1. DeMonster (kills the pop-ups, jackpot tables and does all sorts of neat little stuff)
2. PartySNGhelper
3. PartyPlanner (works better for me than the dave's one)
4. Auto close script
Turbojunge once wrote an auto-SNG-opener (it wasn't open source). I bought it, he abandoned it, i hated him for that. I wonder if one could be made again?
1. DeMonster (kills the pop-ups, jackpot tables and does all sorts of neat little stuff)
2. PartySNGhelper
3. PartyPlanner (works better for me than the dave's one)
4. Auto close script
Turbojunge once wrote an auto-SNG-opener (it wasn't open source). I bought it, he abandoned it, i hated him for that. I wonder if one could be made again?
1. SNG-Helper.
2. Table Highlighter - you might find this useful too, but it needs a few tiny tweaks to make flashing work with SNGs. I'm finding a purple/blue (using Multi-Grey mod it shows up nice) chat-box when you have actions (not advanced action though) with flashing purple after 10 seconds of no action being made (this warns me about the tables eating into my timebank).
3. The Party AHK Planner script I converted from StarsPlanner last night (seems to be working better now).
As far as making a SNG opener, then I think it might be possible, but could end up buggy (after seeing the leave table thing go wrong yesterday - I don't know if I'd trust it. If I get chance I'll start with something that opens a table and tries to seat u using F11 or something and see how robust it is - I'd also like to fix the filters too as nearly started up a whole set of limit SNGs earlier without realizing (luckily I used to play S/H limit, but it's only a mater of time b4 I start some Omaha or Stud games and be totally clueless).
Juk
2. Table Highlighter - you might find this useful too, but it needs a few tiny tweaks to make flashing work with SNGs. I'm finding a purple/blue (using Multi-Grey mod it shows up nice) chat-box when you have actions (not advanced action though) with flashing purple after 10 seconds of no action being made (this warns me about the tables eating into my timebank).
Turbojunge once wrote an auto-SNG-opener (it wasn't open source). I bought it, he abandoned it, i hated him for that. I wonder if one could be made again?
I will put it online when I get home from work (~3 hours) and check it still works OK.
I was unaware the old one was broken / abandoned, or I'd have published my Free AHK one already...
Some very nice work you have done here Juk - I have a few comments, but I'll save them until I get home since I'm not really suposed to be posting here while "working" lol.
EDIT: and Juk - have you seen this thread yet? code worth checking out I'd think...
OT rant: I think he'll get flamed after the rakefree thing, but alot of what he said it true - pokersite owners are laughing all the way to the bank. If games like WOW can charge $20 a month for their immensely complex/artistic games, then how the [censored] can pokersites charge like 1000x times more for such simplistic software? IMHO, it's 100% robbery - ok so WSEX was a total failure with all it's rocks and no fish, but I'm sure 1% rake would generate some decent advertising revenue. Also, as somebody once pointed out in another post, why do the sites not compete on rake? In pretty much every industry the competitors compete based on providing the most cost effective service, yet pokersites seem to have some kind of monopolistic gentleman's agreement that they won't compete. Maybe one day the UK will have a poker-site regulator and they tend to punish monopolies and induce competition - we can only hope. Anyway, that just my 2c...
Juk
Feedback is used for internal purposes. LEARN MORE