Two Plus Two Newer Archives

Two Plus Two Newer Archives (http://archives1.twoplustwo.com/index.php)
-   Software (http://archives1.twoplustwo.com/forumdisplay.php?f=47)
-   -   PStars Grabber (New AHK script) (http://archives1.twoplustwo.com/showthread.php?t=352606)

MSPChris 03-11-2007 04:17 PM

PStars Grabber (New AHK script)
 
Here's a script that writes the hands from an Instant Hand History window to your History file. From there you can import it into PokerTracker or whatever you want.

I read some of the posts about Stars and gathering data on your opponents, and I saw some people charging 20$??? for a program that mines.

Yellowbluebus posted a quick and dirty script to grab scripts, and he invited people to modify it. That's what I did. If you are interested, his original AutoIt script is here.

Mine's free -- but I warn you you're getting what you pay for haha.

Anyone with comments or suggestions, feel free to either post them or PM me.

---START SCRIPT---

/*
################
################
###
### PStars Hand Grabber 0.9
### --by MSPChris (2+2 n00b, AHK n00b)
###
### Credit to Yellowbluebus 2+2er who posted the original PS Helper
### AutoIt3 script.
###
### Credit also to the [censored] who try to charge for this stuff.
###
###
### This AHK script grabs PStars histories and puts them into a
### history file. From there the histories could be imported into PTH
### or PO.
###
### The best way to use this script is to observe tables and choose which
### ones to play on. There are other uses, but other uses are not
### intended nor are they recommended since they violate of PStars TOS.
###
### Run this script once you open Stars, but before you actually log on.
###
### Do not run this script while you're playing. It doesn't work. IF
### you decide to try it while you're playing, you won't be able to take
### any actions on your tables or you'll [censored] it up.
###
### You can use the computer while the script is not running, but when
### it starts you should not do anything until the IHH windows disappears.
### Once it disappears you can go back to what you were doing before!
###
### OPERATING INSTRUCTIONS:
###
### 1) For the variable cFileName, use your own PStars Screen Name
### 2) Set cSleep for how often you want to run the grabber to run.
### I've found that even with 40 tables or so open, the Instant Hand
### History will hold between 30-45 minutes worth of hands right now
### the script is set to run every 10 minutes.
### 3) Save the script after you've customized it.
### 4) Open PStars.
### 5) Open the IHH Window.
### 6) IF you want to use the PC while this utility runs, you may want to
### resize/move the IHH window to someplace where you can see most of
### the screen.
### 7) Open the tables that you are interested in.
### 8) You may want to start PT or PO to process your hands while the
### script runs.
###
### I'm still playing with this code -- if you know a lot about AHK you can
### see that I don't! haha
###
### Tips, Tricks, Hints, and Suggestions for improvement are welcome.
###
### I may post this script elsewhere, like the AHK pages, later on but I
### want to refine it more and add some cooler [censored].
###
### Enjoy!!
###
###
### --MSPChris
###
################
################
*/



; auto-execute

cIHH = Instant Hand History
cPSTable = Afx:400000:28:10011:0:01 ;table of hands in the IHH window
cSrch = `'
cFileName = C:\Program Files\PokerStars\HandHistory\YOURPSTARSACCOUNTNAME \CurrData
cSleep = 600000 ;set to 10 min -- change the time interval here
lastGameID = 0


; start IHH grabber loop

loop
{
prevTableName:=
prevGameID:=
WinActivate, %cIHH%
Control,Choose,1,ComboBox1,%cIHH%
ControlFocus, %cPSTable%,%cIHH%
If (lastGameID = 0)
{
Send {PgUp 10}
}
else
{
GoSub FindLastGameID
}
FileID := A_Index
Loop
{
WinActivate, %cIHH%
ControlGetText,History,Edit2,%cIHH%
Loop, Parse, History, `n
{
IfEqual, A_Index,3, break
aHistData%A_Index% = %A_LoopField%
}
Pos := InStr(aHistData2,cSrch,0,0)
StringMid,TableName,aHistData2,8,(Pos-8)
StringMid,GameID,aHistData1,18,10
If (TableName = prevTableName) and (GameID = prevGameID)
break
prevTableName:= TableName
prevGameID:= GameID
FileAppend,
(
%History%
),%cFileName%%FileID%.txt
WinActivate, %cIHH%
ControlFocus, %cPSTable%,%cIHH%
Send {Down}
}
lastGameID := (prevGameID - 10000)
WinMinimizeAll
Sleep, %cSleep%

}
return



; Finds last hand from previous loop
FindLastGameID:
ControlGetText,History,Edit2,%cIHH%
StringMid,GameID,History,18,10
Loop
{
If (GameID > lastGameID)
{
Send {PgUp 4}
break
}
else
{
Send {PgDn 2}
ControlGetText,History,Edit2,%cIHH%
StringMid,GameID,History,18,10
}
}
return

--- END SCRIPT ---

steel108 03-11-2007 04:22 PM

Re: PStars Grabber (New AHK script)
 
[img]/images/graemlins/frown.gif[/img] I bought one for $50

MSPChris 03-11-2007 04:40 PM

Re: PStars Grabber (New AHK script)
 
Well I won't kid you -- you probably got some nice features and cool graphics.

And my script is *definitely* a work in process.

But it's free... and it works... pretty much haha

MSPChris 03-13-2007 10:04 AM

Re: PStars Grabber (New AHK script)
 
Update: I've been running this script nightly -- pulling data from between 30-70 tables without a hitch all night every night.

grouchie 03-13-2007 03:36 PM

Re: PStars Grabber (New AHK script)
 
just tried it out, works pretty good....
thanks man
saved me some $$$$

EkL 03-13-2007 05:50 PM

Re: PStars Grabber (New AHK script)
 
this works awesome. Any future plans to (hopefully) make it usable while playing?

edit -- everytime the program "grabs" from the hand histories, everything on my screen minimizes. anyone else getting this? Am I doing something wrong?

MSPChris 03-13-2007 10:57 PM

Re: PStars Grabber (New AHK script)
 
I'm glad someone else is finding it useful! Thank you for the feedback. I will continue trying to improve it....

the screens minimizing at the end -- it's supposed to do that. That worked OK for me -- I'll change it so it doesn't next update.

Also -- I'm tinkering with trying to make it work while you play, but that's much easier said than done. If anyone with more AHK knowledge than me wants to comment here or PM me with some advice, that would be good.

I'll figure it out eventually, but it might take awile....

Clashes 03-13-2007 11:16 PM

Re: PStars Grabber (New AHK script)
 
I was just wondering, has stars said anything about the use of this program? It seems great but I dont want to compromise my account.

steel108 03-13-2007 11:45 PM

Re: PStars Grabber (New AHK script)
 
The ban datamining, but it's not a policy that they can really enforce.

effang 03-14-2007 12:56 AM

Re: PStars Grabber (New AHK script)
 
Is that true? I thought they banned data mining for certain programs. But this is an AHK, and not an actual "program" and more of a script.


All times are GMT -4. The time now is 12:15 PM.

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