|
#1
|
|||
|
|||
Statbook - Now watch PT replayer with stats
I always found it frustrating I couldn't watch hands replayed from PT with stats. So, I set out to build a way to do this. A while later, I'm saying to myself, "Holy crap, it works!"
What I built is a spreadsheet that houses the stats and displays them around the replayer window. There is also an AHK script (thanks to Adde) that will read the replayer and tell the spreadsheet who is in the hand. For lack of a better name, I started referring to the spreadsheet as a "Statbook." I don't have anyway to host the spreadsheet. So if anyone would like to host it, please post in the thread and we'll get this available to download. Here are the directions to get it up and running. -First you'll need to export the stats from PT. Set the date to alltime, then go to the summary tab, click on the "e" button, enter a file name, and export everything the way PT has it setup. -Select the entire tab of the export spreadsheet and paste it as values into the entire "Stats 1" tab of the Statbook spreadsheet. -Select all and sort the data. There will likely be more than one instance of each sn if you have multiple limits shown. So sort the data descending by limit or delete the data for limits you don't care about. (or you can sort by number of hands descending and it will retrieve the instance of a player match with the largest sample regardless of limit) The formulas in the Statbook Main tab will retrieve stats for the first match for each name starting on Stats 1 at the top and going down, then Stats 2, then Stats 3. -I created the extra Stats tabs for my datamined databases. So for example, I put my full datamined db export in Stats 1, my partial datamined db in Stats 2, then my personal db data in Stats 3. This way the largest sample available is always being displayed on the Main tab. -Create a new AHK script, name it Statbook, and paste in this script. This will send the names and positions of the players from PT to the spreadsheet. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #Persistent excelFilename := "Statbook" lastHandnum := "" SetTimer, PollReplayer, 5 return PollReplayer: SetTitleMatchMode, 1 WinGet, winID, ID, Playback for ahk_class FNWNS370 if (winID = "") return WinGetText, text, Playback - Hand History ahk_class FNWNS370 if (text = "") return pos := InStr(text, "Game") if (pos < 1) return StringMid, text, text, pos+4 pos := InStr(text, "*") if (pos < 1) return StringMid, handnum, text, 1, pos-1 handnum = %handnum% if (handnum = "") return if (handnum = lastHandnum) return lastHandnum := handnum Loop, 10 playerList%a_index% := "" Loop, parse, text, `n, `r { line := A_LoopField pos := InStr(line, "Seat") if (pos < 1) continue pos := InStr(line, ":") if (pos < 1) continue StringSplit, arr, line, %A_Space% thisSeat := arr2 StringReplace, thisSeat, thisSeat, :, , All playerList%thisSeat% := arr3 } SetTitleMatchMode, 2 WinMinimize, ahk_id %winID% WinActivate, %excelFilename% Send ^{HOME} WinActivate, %excelFilename% Send {RIGHT} Send {DOWN} Loop, 10 { thisPlayername := playerList%a_index% if (thisPlayername = "") thisPlayername := "." clipboard = %thisPlayername% WinActivate, %excelFilename% Send ^v Send {ENTER} } WinActivate, ahk_id %winID% ControlFocus, Button25, ahk_id %winID% ControlGet, result, Enabled, , Button25, ahk_id %winID% if (result) Send {SPACE} return ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -I tried to set it up where you could just hit play and it would automatically update the stats. Unfortunately, this made my computer totally wig out when the replayer was in play mode and the ahk script was going. So you have to advance the action manually. It will not work when you hit play . -To make advancing the action easier, there is a second ahk script. At first I thought advancing the action manually was going to be a huge pain, but now I actually like it a lot better. You can fly through boring parts of the hand and jump back pretty to see who was the pfr raiser or whatever quite easily. I made it so that I could do everything with the mouse. The way I have it setup now, I just scroll the wheel to advance the action, and then I can push the wheel to the right or left to go to next/previous hand. -So, create another new script, name it Statbook Replayer, and paste in this script. Note, this is what I use for my mx1000 with MY logitech settings. I have my "Push Wheel to the Right" setting as Ctrl-X and my "Push Wheel to the Left" as Ctrl-C. You'll need to set these to match in your Logitech Software OR modify the script. (If you don't have a mouse that has multiple buttons and capabilities, just change the ^X and ^C hotkeys to keyboard keys like "Up" and "Down"). ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ^X:: WinActivate Playback for Click 210, 50 return ^C:: WinActivate Playback for Click 85, 50 return WheelDown:: WinActivate Playback for Send {RIGHT} return WheelUp:: WinActivate Playback for Send {LEFT} return ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -The stats being displayed are: Top line: VPIP PFR AGG Bottom line: Wtsd W$SD #Hands -You'll need to have the "Hand History Text" option checked in PT when hands are being replayed. The ahk script actually reads from the HH window not the main replayer window. -I have two monitors, so I have the main PT window on one monitor, and the Statbook spreadsheet and the replayer window on the other. If you have only one monitor, you'll probably have to resize the main PT window to be really small so it doesn't block everything else. -I locked most of the cells on the Main tab so I couldn't mess it up. There is no password though, just unprotect it if you want to play around with it. -When you play new hands, you'll need to make a new export, delete the old data in the Statbook, and paste in the updated data. To make this quicker, you can just export the current limit you're playing and need stats for. I think that's about it. Enjoy. -Trebek |
#2
|
|||
|
|||
Re: Statbook - Now watch PT replayer with stats
It's possible to host files at Overcards, as an attachment. If Mogubo don't mind the traffic...
Adde |
#3
|
|||
|
|||
Re: Statbook - Now watch PT replayer with stats
Sounds good. You want me to email the spreadsheet to you?
|
#5
|
|||
|
|||
Re: Statbook - Now watch PT replayer with stats
I can't paste anything on the clipboard bc it says that the two files are not the same files or something. Could you be more specific with respects to Step 2?
|
#6
|
|||
|
|||
Re: Statbook - Now watch PT replayer with stats
i'm not sure what you mean, that step is just a traditional copy and paste of an excel range.
if the error you're getting is something like the area ranges are different, then highlight the entire tab when you paste it. |
|
|