Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Internet Gambling > Software
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-30-2006, 12:04 AM
_dave_ _dave_ is offline
Senior Member
 
Join Date: Feb 2005
Location: UK
Posts: 2,628
Default AHK: NL_SeatSnagger - A PST-like script with extra NL goodness

Hi all

There probably is little need for this, what with Poker-Seat-Taker already accomplishing a similar task to this, but since I recently started to learn AHK wanted to write this for the learning experience.

Also I am not good enough to understand a lot of the PST / Poker Library code, and I could not get it to work on Empire [img]/images/graemlins/frown.gif[/img]. So I made one myself [img]/images/graemlins/smile.gif[/img] From what I can tell (with only a Party observer client), It seems to work fine on both softwares.

Now I am done, I guess some people will find it useful (If it works OK, that is [img]/images/graemlins/smile.gif[/img])

If any of the resident AHK masters (Roland, Adde, Juk, SamIam, Mogobu, others I am sure I have missed) want to offer me any tips where I have done something in a silly way please let me know [img]/images/graemlins/smile.gif[/img]


Basically, This script allows you to open a table (of the currently selected limit), with specified minimum deepness of stacks (I don't like to play against short-stacks lol), with a specified number of seats (example here is 5/6 or 4/6 taken), and also search for tables containing buddies.

If you so desire, you can combine all these searches, so you could for example open only tables where a buddy is sitting with stacks >150bb, and there is one open seat.

Or you can use each search individually, on different hotkeys, as my demo code does.

Code follows in the post below,

Enjoy,

dave.
Reply With Quote
  #2  
Old 06-30-2006, 12:06 AM
_dave_ _dave_ is offline
Senior Member
 
Join Date: Feb 2005
Location: UK
Posts: 2,628
Default Re: AHK: NL_SeatSnagger - A PST-like script with extra NL goodness

;_________________________________________________ _________________________________________
;_________________________________________________ _________________________________________
;
; NL_SeatSnagger.AHK
;
; In an effort to learn some AHK basics, I wrote this - with a little help from reading
; Poker Seat Taker, and other fine scripts by Roland, Adde, SamIam, Juk, Mogobu and
; any others I have forgotten right now.
;
; This is kinda similar to Poker-Seat-Taker, but with somewhat of an NL bias - I hate
; to open a table to find it infested with short-stacks, so these are detected and
; skipped past - also, I prefer to get in on the action right away rater than join a
; waitlist, as PST does so well - so I made this.
;
; Also, I wanted to automate buddy searces somewhat, and most of all I wanted to
; practice some basic AHK techniques. If anyone has any AHK advice - e.g I have done
; some part of this in a most inefficient manner, please let me know so I may learn.
;
; Enjoy!
;
; _dave_
;
;
; No guarantees provided, use this at your own risk, YMMV, etc etc....




;_______ Hot Key Mappings

F1::
getatable(1, 80) ;____ get a 6-max table with 1/2 open seats,
return ;____ 80bb minimum stack requirement (dreaming, no...)

F2::
getatable(1, 65) ;____ get a 6-max table with 1/2 open seats,
return ;____ 65bb minimum stack requirement (kinda more likely)

F3::
getatable(1, 50) ;____ get a 6-max table with 1/2 open seats,
return ;____ 50bb minimum stack (my shortstack tolerance threshold)

F4:: ;____ damn the short-stacks, just get me a six max table,
getatable(1) ;____ with at one or two open seats...
return



F5:: ;____ get any table, so long as it has one of my favourite
getatable(0, 0, 1) ;____ "buddies" sitting down - LOL - I may learn something
return ;____ if I watch these guys long enough (he says hopefully)


;_______ END Hot Key Mappings





getatable(find_seating=1,minstack=0, find_buddies=0)
{
;_________ SET PREFERENCES HERE



seating = 5/6, 4/6
buddies = loloTRICKEDu,NoreasteR_,Gamble4You,samoleous,sheca ntsayno,Fukken_Eh,akshawnd

;_________ These "Buddies" are not recommended, unless you really dislike money...
;_________ DO NOT use spaces between buddies - it won't work if you do...



;_________ DO NOT EDIT BELOW HERE (unless you know you want to....)






;_________ let's check if we have Empire or Party....

WinGet, id, ID, EmpirePoker: Poker Lobby
If (id)
{
;msgbox "got Empire"
playertab := AfxWnd428
}
Else
{
WinGet, id, ID, PartyPoker.com
If (id)
{
;msgbox "got Party"
playertab := AfxWnd4214
}
Else
{
MsgBox, Failed to detect Party or Empire
return
}
}

;__________ Well, we have one or the other - let's go

WinGetTitle, title, ahk_id%id%

SetTitleMatchMode, 2
WinGet, opentables, List, Good Luck, , Lobby
;msgbox %opentables%



WinActivate, ahk_id%id%
ControlFocus, SysListView321, ahk_id%id%
ControlGet, row, List, Col2, SysListView321, ahk_id%id%
StringMid, bb, row, InStr(row, "/$")+2
StringMid, bb, bb, InStr(bb, "`n")-1,,L
;msgbox %bb%
first_pass := 0

Loop
{
table_is_good := 0

WinActivate, ahk_id%id%

ControlFocus, SysListView321, ahk_id%id%
ControlGet, result1, List, Count, SysListView321, ahk_id%id%
ControlGet, result2, List, Count Focused, SysListView321, ahk_id%id%

if (result1 = result2) ;________ we have hit the end of the list
{
break
}

if (result2 <> 1 || first_pass = 1)
{
Send {DOWN}
Sleep -1
}
first_pass := 1

;__________ get the name of this table

ControlGet, tablerow, List, Selected, SysListView321, ahk_id%id%
StringMid, selected_table, tablerow, InStr(tablerow, "$")-2,, L
;Msgbox %selected_table%

IfInString, selected_table, pvt table
{
continue
}

;__________ check if table is open already

already_open := 0


Loop, %opentables%
{
curr_id := % opentables%A_index%
WinGetTitle, anopentable, ahk_id%curr_id%
StringMid, tablename, anopentable, InStr(anopentable, "-")-2,, L
If (selected_table = tablename)
{
already_open := 1
break
}

}
If already_open = 1
{
continue
}

IfInString, tablerow, 0/10
{
IfInString, tablerow, 10/10
{
;___ do nothing
}
else
{
continue
}
}
IfInString, tablerow, 0/6
{
continue
}


If find_seating = 1
{
If tablerow contains %seating%
{
table_is_good := 1
}
else
{
continue
}
}

If (minstack > 0)
{
ControlClick, ahk_class%playertab%, ahk_id%id%
Loop
{
gotstacks := 0
Sleep, 333
ControlGet, stacksizes, List, Col3, SysListView322, ahk_id%id%
IfInString, stacksizes, $
{
break
}
}

min := minstack * bb
;msgbox % "$" . min
;msgbox %stacksizes%
table_is_good := 1
Loop, Parse, stacksizes, `n
{
IfInString, A_Loopfield, $
{
;msgbox %A_Loopfield%
StringMid, chips, A_Loopfield, 2
;msgbox % A_Loopfield . " - " . chips

If (chips <= min )
{
table_is_good := 0
;msgbox % chips
}
}
}
If table_is_good <> 1
{
continue
}
}

If (find_buddies = 1)
{
ControlClick, ahk_class%playertab%, ahk_id%id%
Loop
{
buddy := 0
Sleep, 333
ControlGet, playernames, List, Col2, SysListView322, ahk_id%id%
letters = a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y, z
If playernames contains %letters%
{
break
}
}
;msgbox %playernames%
Loop, Parse, playernames, `n
{

If A_Loopfield contains %buddies%
{
table_is_good := 1
;msgbox %A_loopfield%
}
}

If table_is_good <> 1
{
continue
}
}

If table_is_good = 1
{

Send {ENTER}


break

}
}

;__________ after we are done
;__________ go back to the top

Loop
{
WinActivate, ahk_id%id%
ControlFocus, SysListView321, ahk_id%id%
ControlGet, result2, List, Count Focused, SysListView321, ahk_id%id%
if (result2 = 1)
{
break
}
Send {PGUP}
}

Sleep, 2000
WinActivate, ahk_id%id%
;Msgbox %tablelist%

}
Reply With Quote
  #3  
Old 06-30-2006, 12:50 AM
tcorbin16 tcorbin16 is offline
Senior Member
 
Join Date: Mar 2006
Posts: 2,649
Default Re: AHK: NL_SeatSnagger - A PST-like script with extra NL goodness

Dave I am gonna test this out, I was just thinking about how useful something like this would be!!!! as for the buddies - you just gotta enter the ones from your BL to that script???
Reply With Quote
  #4  
Old 06-30-2006, 01:10 AM
_dave_ _dave_ is offline
Senior Member
 
Join Date: Feb 2005
Location: UK
Posts: 2,628
Default Re: AHK: NL_SeatSnagger - A PST-like script with extra NL goodness

[ QUOTE ]
as for the buddies - you just gotta enter the ones from your BL to that script???

[/ QUOTE ]

Yes, you must type in the names of your buddies, comma seperated list, no spaces remember.

There is probably a fancy way to auto-fill this list from the PP buddy-list window, but I am not so skilled in AHK to be able to figure that out...

The script will then open tables containing your buddies should you specifiy this behaviour in the hotkey defenitions.

Generally I leave the table list sorted by avg.pot, so thst when I click F1 or whatever the first table opened is suitably deep, has an available seat and also one of my buddies present [img]/images/graemlins/smile.gif[/img]

Enjoy,

dave.
Reply With Quote
  #5  
Old 06-30-2006, 12:57 AM
mkflsam mkflsam is offline
Senior Member
 
Join Date: Aug 2005
Posts: 324
Default Re: AHK: NL_SeatSnagger - A PST-like script with extra NL goodness

Thank you so much!

This is an awesome script, been waiting for something like this for a long time. One feature which would be nice is to automatically sit down and buy in at the opened table. Going to see if I can incorporate some of the code from Adde's script.

I love the default buddy list, just need to add beeandtheboo and you're golden. [img]/images/graemlins/laugh.gif[/img]
Reply With Quote
  #6  
Old 06-30-2006, 01:30 AM
_dave_ _dave_ is offline
Senior Member
 
Join Date: Feb 2005
Location: UK
Posts: 2,628
Default Re: AHK: NL_SeatSnagger - A PST-like script with extra NL goodness

[ QUOTE ]
Thank you so much!

This is an awesome script, been waiting for something like this for a long time.


[/ QUOTE ]
TY, glad you like it [img]/images/graemlins/smile.gif[/img]

[ QUOTE ]
One feature which would be nice is to automatically sit down and buy in at the opened table. Going to see if I can incorporate some of the code from Adde's script.


[/ QUOTE ]

That would be ideal - I am a bit of an AHK n00b, I couldn't figure out how they did that. But I didn't spend much time worrying about it - I use Mogobu's PartyPlanner, so I know where the new table will appear, in conjunction with JukOfYork's Auto-Resizer, so sitting + buyin full is a single click affair - If you haven;t tried either of these apps, give them a spin [img]/images/graemlins/smile.gif[/img]

dave.
Reply With Quote
  #7  
Old 06-30-2006, 01:43 AM
mkflsam mkflsam is offline
Senior Member
 
Join Date: Aug 2005
Posts: 324
Default Re: AHK: NL_SeatSnagger - A PST-like script with extra NL goodness

Oh nice, thanks. Auto-Resizer is definitely nice.

BTW, do you know if there is a way to make it so the Party lobby doesn't grab focus and block the poker tables when it's searching? Small annoyance I've run into with every .ahk script when your entire monitor is full of tables.

Again, really nice work. Thanks for sharing it with us!
Reply With Quote
  #8  
Old 06-30-2006, 01:56 AM
_dave_ _dave_ is offline
Senior Member
 
Join Date: Feb 2005
Location: UK
Posts: 2,628
Default Re: AHK: NL_SeatSnagger - A PST-like script with extra NL goodness

[ QUOTE ]

BTW, do you know if there is a way to make it so the Party lobby doesn't grab focus and block the poker tables when it's searching? Small annoyance I've run into with every .ahk script when your entire monitor is full of tables.


[/ QUOTE ]

I just hammer the bet-pot / fold buttons while a search is going on [img]/images/graemlins/smile.gif[/img] Eventually the message gets through to the tables before I time out [img]/images/graemlins/smile.gif[/img]

If the constant lobby focusing is causing you to time out etc, you could add a line to the script:

<font color="blue">
Sleep, 2000
</font>

At line 139, just before the "Send {DOWN}" command.

This would make the search pause for 2 seconds before moving down to the next table - obviously making the full search slower but giving you much greater time to take care of hands in progress - you could try various time values also - 2000ms is probably far too large a gap between tables, but I guess the optimal value depends on: A) your comp's processing power, and more importantly b) what else the CPU is having to take care of while multiple tables and a search are going on....

Have fun tweaking [img]/images/graemlins/smile.gif[/img],

dave.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:06 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.