interpreting_titletext - OpenHoldem/openholdembot GitHub Wiki
Most casinos show very valuable info in the titlebar, for example
Tournament 12345678 Table 5 - No Limit Hold'em - Blinds $600/$1200 Ante $75
Valuable informations in the example above (PokerStars) are:
-
the game-type: tournament (and no-limit)
-
the size of the blinds: $600 / $1200
-
the ante: $75
Besides of valuable info the titlestring comes with some technical benefits:
-
it is usually very reliable
-
it can be accessed easily with the Windows API (GetWindowText) and does not require any scraping.
Therefore OpenHoldem provides a way to interpret the titletext:

In the example above
-
β^*β followed by the constant string β- β recognized and discards everything until it finds β- β in the titlestring. This means the title-parser will skip βOpenHoldem Poker - β because this data does not provide any useful info for us.
-
Again there follows a dummy that needs to be skipped. β^* - blinds β will ignore everything until it finds β - blinds β.
-
Now comes the first interesting piece of data. β^sβ expects a numerical value, here β5β that will be interpreted as the size of the small blind.
-
β/β is a constant string that will be ignored. In our exaple it separates small-blind from big blind.
-
Finally β^bβ works similar like β^sβ: it expects a numerical value too and interprets it as the size of the big-blind.