Thursday, June 14, 2012

Color Code PokerStars Notes With PokerTracker 4

If you are familiar with PokerStars notes, notepad, and copying / renaming files, you may want to color your Stars notes using PT4 filters.
Color Code PokerStars Notes With PokerTracker 4

I can color 85,000 Tourney players in about 25 minutes, each color designated by PT4 filters:

- 19 minutes to create ALL Dates / PT4 players reports and export them in a text file
- 5 minutes for batch files to filter and label all the players
- 1 minute to import  new PokerStars notes into existing notes
"You must disable Real-time protection in Microsoft Security Essentials (MSE if enabled), or it will cripple the amount of time to complete the batch files sorting (MsMpEng.exe)."

The 7 Day PT4  Custom filter,  run anytime within the last 7 days, will allow you to update your PokerStars players notes in 11 minutes with recent play.

- 8 minutes to create Last 7 Days PT4 players reports and export them in a text file
- 2 minutes for batch files to filter and label all the players
- 1 minute to import new PokerStars notes into existing notes

The more recent post Color Your PokerStars Notes While Playing Online will simplify these following steps.

Steps to Color Your PokerStars Notes:

1 - Download Notepad ++ free application & TUEJUN19-PT4STARS.ZIP. Create a directory called PT4STARS in your documents, and a library (if Windows 7) called PT4STARSLIB (Include the directory PT4STARS). Copy & extract the Zip file into this directory.

2 - Create PT4 Reports, with any of the PT4 filters available, for each color label that you require

3 - Run batch files to filter, sort, and label each player's color in your PT4 reports

4 - Import your new color notes into your PokerStars Notes xml file.

PT4 - PokerStars Notes Color Scheme Example:

Using PT4 Reports, this is my VPIP Color scheme for Tourneys / SNG's:
PT4 - PokerStars Notes Color Scheme Example:

As of now, there is no commercial support for Poker Tracker 4 and coloring Stars notes. You can actually use this with any product (PT3) that that will export a players report in a text file, for Stars colors (ideal for table selection).

PokerStars Notes Import Problems:
Took me a bit, but I finally located the characters in poker players names that were stopping my imports into PokerStars Notes xml files. It's PokerStars players names that contain any of the three  following characters:  (", <, >).

"Herz.dame <3"    "J<<<1212>>>J"    "yamy "o""

Out of 85K players, I have only 59 players that were flagged / filtered.

A Quote ( " ) at the beginning or end of the player's name (which causes a double quote in the XML file and causes import errors). The greater or less then symbols (<, >) are used by the xml files (create format errors). The batch files included separate players names with the bad characters.

PokerTracker 4 Reports:
The exported PT4 Reports HAVE to be named in this format PT4-EXPORT-Label-0. Each color label 0-9 has a separate report in order for these batch files to work. I have provided batch support for up to 10 colors.

Here is an example of what your PT4 Filter Menu will look like:
PokerTracker 4 Reports:

PT4-EXPORT-Label-0 NIT = VPIP < 10 %
To create a PT4 report based on VPIP, you could designate label 0 as NIT with a VPIP of 0-10 %.

Add these Stats to your PT4 Report Filter to only display:
Player -  VPIP  -  Chips Won  -  Hands

The Expression Filter is edited for VPIP < =10 %.

You save the report, but name it PT4-EXPORT-Label-0 NIT = VPIP < 10 % (anything after the 0 to help you remember the report's intention). Report will automatically run.

Set the Date option to ALL Dates and run the report again (verify the stats). Duplicate this report.

With the duplicated report, remove the stats:
VPIP - Chips Won - Hands

Sort the report with names alphabetical (troubleshooting potential).

This time you will save it only as PT4-EXPORT-Label-0. Copy the name PT4-EXPORT-Label-0 and select Export the report to your PT4STARS directory as (Paste) PT4-EXPORT-Label-0.txt.

You now have two PT4 Reports in your PT4 Filter List:
PT4-EXPORT-Label-0  NIT-VPIP < 10 %

Check that both reports have the same number of players, where the second report (no stats) is used just to export the players names for the batch files.

You have to repeat this with each Label 0-9 (color) that you want to use. They will be automatically sorted in the PT4 menu list. Always copy and paste these names for filenames when exporting reports (after you have created your original ones), or you are doing something wrong.

The exception is if you have a set of filters for different games, like: HYPER, 6 Man, HU, or DON. Then you would have a directory for each game type and the filters would be named (if HYPERS):


When you export the PT4 filtered text file, you would drop the the game type and have a file name that was written for the batch files, but saved in it's own game type directory (PT4STARSHYPER).


Kraada / WhiteRider (PokerTracker 4 support), have created a filter that allows you to display all the players you have played against in the last 7 days, with their lifetime stats (PT4 Forum Topic.).
You need to create one filter for each color, and the "7 days" can be changed to any number that you prefer by editing the "7" in the PT4 filters:

interval '7 days'

You still need to save it in  PT4-EXPORT-Label-0 format for the batch files.

Download: Notepad ++
Download here  Notepad ++ which will allow you to easily copy / past / save XML files. It is just like Notepad, but with more features.

I use the Macro recorder option to quickly simplify the copying / pasting process of player names within the batch files.

Download here the TUEJUN19-PT4STARS.ZIP file and copy it to the PT4STARS directory, which include the batch files and two xml files.

This is your new directory PT4STARS with extracted files:
This is your new directory PT4STARS with extracted files:

PT4STARS-Filter-AND-Write XML-Labels.bat:
REM *** This batch file uses the DOS FINDSTR command to remove all POKERSTARS players REM *** names that contain any of the three following characters:  ( ", <, >)
REM *** A Quote at the beginning or end of the player name (which causes a double quote
REM *** to the XML file and causes errors), and the greater or less then
REM *** symbols (which are used by the xml files and cause errors).
REM *** The (echo "-Label-1") is used as a  troubleshooting marker if any fail to appear in the final
REM *** PokerStars Notes file.
REM *** Bad player names are separated into one file with each color label included.
REM *** Here are some examples of bad names:  ""Lex"_expert"      "$<Hada-Tum>$" 

The GOOD players are written in each (PT4-Export-Label-4-Filtered-GOOD.txt) file for each color:

Download here  Notepad ++ which will allow you to easily copy / past / save XML files.

REM *** Each batch file (0-9) is run with the start command to allow simultaneous creation of
REM *** import files for each color label.
REM *** Each PT4 export file that has been filtered for valid player names (XML Friendly), will
REM *** then have the added xml code to designate it the proper color for PokerStars Notes.
REM *** They are then saved in a import file for that specific color label
REM *** (example: PT4STARS-Label-3-IMPORT.txt).
REM *** Each batch file is in this format:
for /f "tokens=*" %%a in (PT4-Export-Label-4-Filtered-GOOD.txt) do (
echo ^<note player= %%a label="4" ^>^</note^>>>PT4STARS-Label-4-IMPORT.txt

These are the same players as previous image except the XML color labels have been added:
These are the same players as previous image except the XML color labels have been added:

REM *** This batch file will take all the IMPORT files and combine into one file called

REM *** Open the PT4Stars-XML-IMPORT.xml in notepad ++.
REM *** Open PT4Stars-READY-to-IMPORT.txt in notepad ++

PT4Stars-READY-to-IMPORT.txt in Notepad ++:
PT4Stars-READY-to-IMPORT.txt in Notepad ++

In Notepad++, you will Select All in the file PT4STARS-READY-to-IMPORT.txt and Copy / Paste it in PT4Stars-XML-IMPORT.xml file

In the image below, you can paste the text at line 16 or overwrite line 15. The file is saved and then imported in PLAYERS NOTES option of IMPORT NOTES. The color scheme (line 15), MUST be identical throughout the file (for each player), as it indicates each variable field within the XML file. It's useful in detecting missing or bad lines in your file.

This is the PT4Stars-XML-IMPORT.xml file imported in Notepad ++:
The file is saved and then imported in PLAYERS NOTES option of IMPORT NOTES.

Do NOT overwrite the last line when copying / pasting which is </notes> since this ends the xml file.

Is the notes file that you can rename to your own notes xml file. It has 10 colors and is a duplicate  of the PT4Stars-XML-IMPORT.xml file. You can also create your own notes settings by renaming your notes to old and logging into PokerStars without any notes.xml file. Pokerstars will create the default one for you after you ADD any player and exit Pokerstars. You can log back in and edit the colors & labels that you prefer. Copy and rename it PT4Stars-XML-IMPORT.xml  for the imports.

Backing Up Your Notes & Changing Notes Directory Location:
If you are not sure where your notes are, go into Stars menu option PLAYERS NOTES and a popup box will have FILE LOCATION Button. That is where your notes file is presently stored. Your file is named in this format: "notes.YOURPLAYERNAME.xml".

This is the PokerStars PLAYERS NOTES option:
Backing Up Your Notes & Changing Notes Directory Location:

Exit out of Pokerstars, and make backup copies of this file. Also rename the existing file to "Backupnotes.YOURPLAYERNAME.xml". You will now log back into Stars and go back into menu option PLAYERS NOTES and select the FILE LOCATION Button again, but this time select the newly created PT4STARS directory in your documents as the new location.

Exit out of Pokerstars, and you should see in the PT4STARS directory a new "notes.YOURPLAYERNAME.xml" file. Rename it as"Backupnotes.YOURPLAYERNAME.xml", and rename  "notes.PHD_$_Thiefs.xml" to "notes.YOURPLAYERNAME.xml". This xml file now has the 10 predefined colors and labels as displayed in the previous image

First Attempt to Color PokerStars Notes with PT4:
Only create one color report and for only a few players to test out your setup. You can run the batch files individually if you are not getting the expected results.

Here is a directory of what PT4STARS directory will look like after running the batch files:
First Attempt to Color PokerStars Notes with PT4:

Attempt to Color PokerStars Notes with PT4:

You could create separate reports for Cash games by selecting the "export your saved reports for cash" option. You can create a separate library/directory for Cash, with a copy of all the batch files.

You can start creating your filters, running your batch files labels, and update your players notes towards the end of your last game / session, completed in 11 minutes.

If you have duplicate player's name in your import file, the last one in your list will have that color.

XML Imports through Stars PLAYERS NOTES option will only overwrite colors and append written notes to players that I tested. It was limited in testing, so backup and verify that your written notes are intact.

 PT4Stars-XML-IMPORT.xml   MUST have been duplicated from your present
"notes.YOURPLAYERNAME.xml" file WITHOUT any modified / additional Colors / Label Name changes. If you changed you original notes.xml, then recreate the PT4Stars-XML-IMPORTxml file.

When you import a notes file, check the first and last player to see if they are all included . Also
the "-Label-0-9" players will be added for every color and should be in your notes.

Some batch files may  be expecting the txt files to be located on the c: drive, so edit the drive letter, copy to c: drive, or remove the drive letter, if needed.

My goal was to make something quick, easy, and WORKING !

No comments:

Post a Comment