Open Side Menu Go to the Top
Register
New AHK script: PS MoneyToBB (working prototype) New AHK script: PS MoneyToBB (working prototype)

09-30-2010 , 04:57 PM
Ok, here is a working prototype of a $2bb script that I've been working on. It is very "homemade" and designed just for my needs so please don't expect too much... I just wanted to see whether something like this could be done.


Download: http://www.mediafire.com/file/faoe6j.../MoneyTobb.zip

Run MoneyTobb.ahk and hit
  • ctrl+§ to attach a bb-HUD on every table
  • F1 to attach a bb-HUD on active table
  • Ctrl+Esc to kill the bb-HUD hud on active table

At the moment it only works with 6max cash and with these table themes and sizes:
  • HyperSimple
    • default table size (800*580 / client area 792*546)
    • minimum table size (483*361 / client area 475*327)
  • Classic
    • default table size
    • minimum table size
  • Black
    • minimum table size

You CAN get this script to work with any table theme or size you want, it just takes some effort (you'll have to find some coordinates which takes about 5-10 minutes if you know what you are doing). To make a script like this work with every table size is a big pain in the ass and I don't really know how it should be done. However, you can make this work with your preferred table size relatively easy.

FR/heads up/etc support shouldn't be too hard to implement (FR seems to already work partially ).

I'm not sure what to say about the scripts performance... I haven't had any lag but I only play 6-9 tables. You can set the script to show the bb amounts only on active table or every table simultaneously. Here are some screenshots with different settings & my crappy old laptop (Acer 3100):

- 9 tbls + HEM + Tableninja
- UPDATE_ACTIVE_TABLE_ONLY := 1 (Gerada II seems to be the current active table)
- UPDATE_FREQUENCY := 100ms
http://img713.imageshack.us/img713/8...activeonly.png

- 9 tbls + HEM + Tableninja
- UPDATE_ACTIVE_TABLE_ONLY := 0
- UPDATE_FREQUENCY := 1000ms
http://img831.imageshack.us/img831/3548/9tblshemtn.png

As you can see, the "UPDATE_ACTIVE_TABLE_ONLY := 0" increases the CPU load pretty heavily so I would only use it when playing¨~6 or less tables.

Hmm, what else... The quality and structure of my code is pretty lol, sorry . The code was done pretty quickly, I'll try to add some comments and stuff later. The script is somewhat vulnerable to PS layout changes but then you'll just have to find the new coordinates so it ain't that bad. I'll teach how to add different table themes/sizes after I'll hear this actually works for someone else

Gdip.ahk and Dock.ahk are taken from the AHK-forums and they are absolutely great, check them out! I have also taken a lot of code from these forums so thanks everyone
New AHK script: PS MoneyToBB (working prototype) Quote
09-30-2010 , 10:07 PM
Nice work! can you explain how it works? I'm guessing ocr on all the stacks?

Quote:
To make a script like this work with every table size is a big pain in the ass and I don't really know how it should be done.
There's probably a few functions of use in BetPot (and several other scripts) relStarsClient Point, relStarsScreenPoint and so on. they take an pair of x/y xoordinates of the client area on a "standard"table size and scale them to different pairs of coordinates depending what you want. only problemn is they sometimes bork a bit with fat window borders as has become the current default trend. window border to 1px and they're solid. Maybe greg fixed this somewhere I think.
New AHK script: PS MoneyToBB (working prototype) Quote
10-01-2010 , 09:24 AM
LOL, there's a pretty cool character recognition function in Max1mums' StarsCash.ahk/PokerShortCuts... How on earth have I missed it? It's actually a bit similar to what I'm using at the moment, just 100x more flexible.

Quote:
Originally Posted by _dave_
Nice work! can you explain how it works? I'm guessing ocr on all the stacks?
Yeah, ocr. But I'm using Gdip_LockBits() & etc to scan the area because apparently it's super fast compared getPixel (..raw bmp data or something, I don't really understand that stuff ). If I knew how to make machine code, things could get super duper fast. I'll explain stuff in more detail when I have made some changes to my script.

Quote:
Originally Posted by _dave_
There's probably a few functions of use in BetPot (and several other scripts) relStarsClient Point, relStarsScreenPoint and so on. they take an pair of x/y xoordinates of the client area on a "standard"table size and scale them to different pairs of coordinates depending what you want. only problemn is they sometimes bork a bit with fat window borders as has become the current default trend. window border to 1px and they're solid. Maybe greg fixed this somewhere I think.
Thanks, I found the StarsCash character recognition function because of this post.
New AHK script: PS MoneyToBB (working prototype) Quote
10-01-2010 , 09:37 PM
well done, i was curious if you were doing ocr. ive been experimenting with Dock myself and you prob saw my post in the thread trying to figure out how to get it to use multiple hosts, i came to the same conclusion that you have to have a main script which calls subscripts
New AHK script: PS MoneyToBB (working prototype) Quote
10-01-2010 , 11:26 PM
Quote:
Originally Posted by greg nice
i came to the same conclusion that you have to have a main script which calls subscripts

this technique is the nuts for loads of scenarios, I use it all the time. particularly useful for not having to deal with limited GUI numbers in a single script - 99 per table is way more than enough, 99 for all tables not close.
New AHK script: PS MoneyToBB (working prototype) Quote
10-06-2010 , 04:11 PM
Nice, have to try this
New AHK script: PS MoneyToBB (working prototype) Quote
10-06-2010 , 05:51 PM
I have a version that work pretty well with every table size I'll release it after I have fixed some bugs..
New AHK script: PS MoneyToBB (working prototype) Quote
10-08-2010 , 03:37 AM
Cool I just posted to FTP to get them to do something just like this.
New AHK script: PS MoneyToBB (working prototype) Quote
10-08-2010 , 07:51 AM
Quote:
Originally Posted by Weegs
If I knew how to make machine code
I don't think I've ever fully understood a single laszlo post.

Nice script.
New AHK script: PS MoneyToBB (working prototype) Quote
10-08-2010 , 08:24 PM
Looks sweet. Could this be made to work for tournaments and on FTP (6max and FR for both)?
New AHK script: PS MoneyToBB (working prototype) Quote
10-10-2010 , 04:52 AM
Quote:
Originally Posted by Weegs
I have a version that work pretty well with every table size I'll release it after I have fixed some bugs..
I like! Please release. Thank you.
New AHK script: PS MoneyToBB (working prototype) Quote
10-20-2010 , 09:40 PM
This guys came with a little great software, if someone is interested look for LongHud in google.
New AHK script: PS MoneyToBB (working prototype) Quote
10-29-2010 , 05:11 PM
Does this work for tournaments as well?
New AHK script: PS MoneyToBB (working prototype) Quote
11-10-2010 , 04:02 PM
Great script Weegs!! I know a few have asked in the thread about tournament support. Any chance of that being worked on for a future release?
New AHK script: PS MoneyToBB (working prototype) Quote
03-04-2011 , 03:03 PM
$$$_to_bb.ahk
Code:
; ##########################
; ### $$$_to_bb          ###
; ###                    ###
; ### version 1.0        ###
; ### By Weegs from 2+2  ###
; ##########################


#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
#SingleInstance force
#Persistent
#Include Includes\Lib\Gdip.ahk
#Include Includes\Lib\CharMap.ahk

if !G@pToken := Gdip_Startup()
{
   MsgBox, 48, gdiplus error!, Gdiplus failed to start. Please ensure you have gdiplus on your system
   ExitApp
}
OnExit, myExitSub

GroupAdd, PS_TABLES_GROUP, ahk_class PokerStarsTableFrameClass

SysGet, G@winCaptionH, 4
SysGet, G@winBorderH, 33
SysGet, G@winBorderW, 32

G@TABLE_THEME := IniRead( "Settings.ini", "SETTINGS", "TABLE_THEME")
G@THEME_INI := "Includes\Themes\" . G@TABLE_THEME . ".ini"
G@DECIMAL_PLACES := IniRead( "Settings.ini", "SETTINGS", "DECIMAL_PLACES")
G@BB_SCAN_FREQUENCY := IniRead( "Settings.ini", "SETTINGS", "BB_SCAN_FREQUENCY")
G@OSD_UPDATE_FREQUENCY := IniRead( "Settings.ini", "SETTINGS", "OSD_UPDATE_FREQUENCY")


SetTimer, updateBBSizes, %G@BB_SCAN_FREQUENCY%
updateBBSizes()
SetTimer, updateToolTips, %G@OSD_UPDATE_FREQUENCY%
updateToolTips()

return
;----------------------------------------
/*
^r::
	Reload
return
*/

;----------------------------------------

myExitSub:
	Gdip_DisposeImage(G@pBitmap)
	Gdip_Shutdown(G@pToken)	
	ExitApp
return

updateToolTips:
	updateToolTips()
return


updateBBSizes:
	updateBBSizes()
return


;----------------------------------------


bbIsFixed( tableID ) {
	IfWinExist, ahk_id %tableID%
	{
		while !winTitle
			WinGetTitle, winTitle, ahk_id %tableID%
		IfInString, winTitle, Tournament
			return, 0
		return, 1
	}
	return, -1
}

calcScaledPos( ByRef x, ByRef y, cliW, cliH ) {
	;DEF_CLIENT_W := 792
	;DEF_CLIENT_H := 546	
	x := Round(x*cliW / 792)
	y := Round(y*cliH / 546)
}

getBigBlind( tableID ) { 
	WinGetTitle, bigBlind, ahk_id %tableID%
	pos1 := InStr(bigBlind, "/")
	pos2 := InStr(bigBlind, A_Space, 0, pos1 )
	bigBlind := SubStr(bigBlind, pos1+1, pos2-pos1)
	if bigBlind is not number
		StringTrimLeft, bigBlind, bigBlind, 1
	if bigBlind is number
		return, bigBlind
}


; to do !!!!!!!!!!!!
getSeatCount( tableID ) {
	
	if seatCount := IniRead( "Settings.ini", "SETTINGS", "DEF_SEAT_COUNT")
		return, seatCount
	
	IfWinExist, ahk_id %tableID%
	{
		while !winTitle
			WinGetTitle, winTitle, ahk_id %tableID%
		
		Loop
		{
			InputBox, UserInput, Seat Count, %winTitle%`n`nHow many seats does this table have (2-10)?
			if (UserInput > 1 && UserInput < 11)
				return, UserInput
		}		
	}
}


getTextFromBitmap( pBitmap, x, y, w, h, txtR, txtG, txtB, txtAltR=-1, txtAltG=-1, txtAltB=-1 )
{
	global
	local MCode_getCharCodesFromBitmap, E, Stride, Scan0, BitmapData, charCode, txt
	static getCharCodesFromBitmap, charCodes, initialized
	
	if !initialized
	{		
		MCode_getCharCodesFromBitmap := "83EC20565733FF33F6897C240C897C2410397C24300"
		. "F8E5B0100008B4424548B5424348B4C241C53558DA4240000000083CDFF896C2420896C241"
		. "033DB33ED85D20F8ED90000008B4424348D50018D0CBA8BF82BFA83C7022BC2897C242C894"
		. "42428EB048B4424288B54242C0FB6140A0FB604080FB6398944241C3B54244475103B7C244"
		. "8750A8B44244C3944241C74163B54245075243B7C2454751E8B5424583954241C7514837C2"
		. "410FF7504896C24108BC58944242043EB048B4424208B54243C034C2440453BEA7C9885DB7"
		. "4442B442410C7442414010000008BC88B44245C894C242483FB0A7D0880C330881C06EB118"
		. "3FB247D0880C337881C06EB04C604063F8B5C24388B7C24184B463BFB7541EB138B4C24248"
		. "B7C24188B44245C837C241400742C83F90A7D088D5930881C06EB1183F9247D088D5937881"
		. "C06EB04C604063F46C604060A46C74424140000000047897C24183B7C24380F8CCEFEFFFF5"
		. "D5B85F6740EC64406FF005F8D46FF5E83C420C35F8BC65E83C420C3"
		VarSetCapacity(getCharCodesFromBitmap, StrLen(MCode_getCharCodesFromBitmap)//2)
		Loop % StrLen(MCode_getCharCodesFromBitmap)//2
			NumPut("0x" SubStr(MCode_getCharCodesFromBitmap, (2*A_Index)-1, 2), getCharCodesFromBitmap, A_Index-1, "char")
		VarSetCapacity( charCodes, 2048 )
		initialized := 1
	}
	
	if E := Gdip_LockBits(pBitmap, x, y, w, h, Stride, Scan0, BitmapData)
		return, "LockBits Error " . E
	charCodes := ""
	DllCall(&getCharCodesFromBitmap,"uint",Scan0,"int",w,"int",h,"int",Stride,"int",txtR,"int",txtG,"int",txtB,"int",txtAltR,"int",txtAltG,"int",txtAltB,"char",&charCodes )
	Gdip_UnlockBits(pBitmap, BitmapData)
	VarSetCapacity( charCodes, -1 )
	Loop, Parse, charCodes, `n
	{
		charCode := "CHAR_" . A_LoopField
		txt .= %charCode%
	}
	return txt
}
/*** The machine code in C ******

// The main idea for this function was taken from Xander. I just wrote it in C and
// turned it into machine code.

int getCharCodesFromBitmap( unsigned char* Scan0, int w, int h, int Stride, int txtR, int txtG, int txtB, int txtAltR, int txtAltG, int txtAltB, char* returnString )
{
	int x, y, firstPixelY, lastPixelY, lastMinusFirstPixel, pixelsInCol, o, R, G, B;
	int i = 0;
	int readingChar = 0;
	
	for ( x = 0; x < w; x++ )
	{
		pixelsInCol = 0;
		firstPixelY = lastPixelY = -1;
		
		for ( y = 0; y < h; y++ )
		{
			o = (4*x)+(y*Stride);
			R = Scan0[2+o];
			G = Scan0[1+o];
			B = Scan0[o];
			
			if ( ( R == txtR && G == txtG && B == txtB ) || ( R == txtAltR && G == txtAltG && B == txtAltB ) )
			{
				if ( firstPixelY == -1 )
					firstPixelY = y;
				lastPixelY = y;
				pixelsInCol++;
			}
		}
		if ( pixelsInCol )
		{
			readingChar = 1;
			lastMinusFirstPixel = lastPixelY - firstPixelY;
			if ( pixelsInCol < 10 )
				returnString[i++] = pixelsInCol + 48;
			else if ( pixelsInCol < 36 )
				returnString[i++] = pixelsInCol + 55;
			else
				returnString[i++] = 63;
		}
		if ( !pixelsInCol || x == w - 1 )
		{
			if ( readingChar )
			{
				if ( lastMinusFirstPixel < 10 )
					returnString[i++] = lastMinusFirstPixel + 48;
				else if ( lastMinusFirstPixel < 36 )
					returnString[i++] = lastMinusFirstPixel + 55;
				else
					returnString[i++] = 63;
				returnString[i++] = 10;
				readingChar = 0;
			}
		}
	}
	if ( i )
		returnString[--i] = 0;
	return i;
}
*/


; From <http://www.autohotkey.net/~Titan/#functions>
IniRead(Filename, Section, Key, Default = "") 
{
	IniRead, v, %Filename%, %Section%, %Key%, %Default%
	Return, v
}

initializeTable( tableID ) 
{

	global
	local n, i, colors, colors0, colors1, colors2, colors3
	
	G@%tableID%_BB_IS_FIXED := bbIsFixed( tableID )
	G@%tableID%_SEAT_COUNT := n := getSeatCount( tableID )
	
	if !G@%n%_MAX_SEAT_1_STACK_DEF_X
	{
		Loop, %n%
		{
			i := A_Index
			G@%n%_MAX_SEAT_%i%_STACK_DEF_X 		:= IniRead( G@THEME_INI, n . "_MAX", "SEAT_" . i . "_STACK_X")
			G@%n%_MAX_SEAT_%i%_STACK_DEF_Y 		:= IniRead( G@THEME_INI, n . "_MAX", "SEAT_" . i . "_STACK_Y")
			G@%n%_MAX_SEAT_%i%_STACK_OSD_DEF_X 	:= IniRead( G@THEME_INI, n . "_MAX", "SEAT_" . i . "_STACK_OSD_X")
			G@%n%_MAX_SEAT_%i%_STACK_OSD_DEF_Y 	:= IniRead( G@THEME_INI, n . "_MAX", "SEAT_" . i . "_STACK_OSD_Y")
			
			G@%n%_MAX_SEAT_%i%_BET_DEF_X 		:= IniRead( G@THEME_INI, n . "_MAX", "SEAT_" . i . "_BET_X")
			G@%n%_MAX_SEAT_%i%_BET_DEF_Y 		:= IniRead( G@THEME_INI, n . "_MAX", "SEAT_" . i . "_BET_Y")
			G@%n%_MAX_SEAT_%i%_BET_OSD_DEF_X 	:= IniRead( G@THEME_INI, n . "_MAX", "SEAT_" . i . "_BET_OSD_X")
			G@%n%_MAX_SEAT_%i%_BET_OSD_DEF_Y 	:= IniRead( G@THEME_INI, n . "_MAX", "SEAT_" . i . "_BET_OSD_Y")
		}
	}
	
	if !G@TOTALPOT_DEF_X
	{
		G@TOTALPOT_DEF_X 		:= IniRead( G@THEME_INI, "COMMON", "TOTALPOT_X")
		G@TOTALPOT_DEF_Y 		:= IniRead( G@THEME_INI, "COMMON", "TOTALPOT_Y")
		G@TOTALPOT_DEF_W 		:= IniRead( G@THEME_INI, "COMMON", "TOTALPOT_W")
		G@TOTALPOT_DEF_H 		:= IniRead( G@THEME_INI, "COMMON", "TOTALPOT_H")
		G@TOTALPOT_OSD_DEF_X 	:= IniRead( G@THEME_INI, "COMMON", "TOTALPOT_OSD_X")
		G@TOTALPOT_OSD_DEF_Y 	:= IniRead( G@THEME_INI, "COMMON", "TOTALPOT_OSD_Y")
		
		G@CURRENTPOT_DEF_X 		:= IniRead( G@THEME_INI, "COMMON", "CURRENTPOT_X")
		G@CURRENTPOT_DEF_Y 		:= IniRead( G@THEME_INI, "COMMON", "CURRENTPOT_Y")
		G@CURRENTPOT_DEF_W 		:= IniRead( G@THEME_INI, "COMMON", "CURRENTPOT_W")
		G@CURRENTPOT_DEF_H 		:= IniRead( G@THEME_INI, "COMMON", "CURRENTPOT_H")
		G@CURRENTPOT_OSD_DEF_X 	:= IniRead( G@THEME_INI, "COMMON", "CURRENTPOT_OSD_X")
		G@CURRENTPOT_OSD_DEF_Y 	:= IniRead( G@THEME_INI, "COMMON", "CURRENTPOT_OSD_Y")
		
		G@MY_BET_OSD_DEF_X 		:= IniRead( G@THEME_INI, "COMMON", "MY_BET_OSD_X")
		G@MY_BET_OSD_DEF_Y 		:= IniRead( G@THEME_INI, "COMMON", "MY_BET_OSD_Y")
		
		G@STACK_AREA_DEF_W 		:= IniRead( G@THEME_INI, "COMMON", "STACK_AREA_W")
		G@STACK_AREA_DEF_H 		:= IniRead( G@THEME_INI, "COMMON", "STACK_AREA_H")
		
		G@BET_AREA_DEF_W 		:= IniRead( G@THEME_INI, "COMMON", "BET_AREA_W")
		G@BET_AREA_DEF_H 		:= IniRead( G@THEME_INI, "COMMON", "BET_AREA_H")
		
		colors := IniRead( G@THEME_INI, "COMMON", "STACK_COLOR")
		StringSplit, colors, colors, `,
		G@STACK_COLOR_R := colors1
		G@STACK_COLOR_G := colors2
		G@STACK_COLOR_B := colors3
		
		colors := IniRead( G@THEME_INI, "COMMON", "STACK_COLOR_ALT")
		StringSplit, colors, colors, `,
		G@STACK_COLOR_ALT_R := colors1
		G@STACK_COLOR_ALT_G := colors2
		G@STACK_COLOR_ALT_B := colors3
		
		colors := IniRead( G@THEME_INI, "COMMON", "BET_COLOR")
		StringSplit, colors, colors, `,
		G@BET_COLOR_R := colors1
		G@BET_COLOR_G := colors2
		G@BET_COLOR_B := colors3
		
		colors := IniRead( G@THEME_INI, "COMMON", "CURRENTPOT_COLOR")
		StringSplit, colors, colors, `,
		G@CURRENTPOT_COLOR_R := colors1
		G@CURRENTPOT_COLOR_G := colors2
		G@CURRENTPOT_COLOR_B := colors3
		
		colors := IniRead( G@THEME_INI, "COMMON", "TOTALPOT_COLOR")
		StringSplit, colors, colors, `,
		G@TOTALPOT_COLOR_R := colors1
		G@TOTALPOT_COLOR_G := colors2
		G@TOTALPOT_COLOR_B := colors3
	}
}



updateBBSizes() {

	global
	local tableID, n
	
	IfWinActive, ahk_group PS_TABLES_GROUP
	{
		tableID := WinExist("A")
		updateTableInfo( tableID )
		G@pBitmap := Gdip_BitmapFromScreen("hwnd:" tableID )
		
		n := G@%tableID%_SEAT_COUNT
		Loop, %n%
		{
			G@%tableID%_seat_%A_Index%_stack_size := getTextFromBitmap( G@pBitmap, G@%tableID%_seat_%A_Index%_stack_X, G@%tableID%_seat_%A_Index%_stack_Y, G@%tableID%_stack_area_W, G@%tableID%_stack_area_H, G@STACK_COLOR_R, G@STACK_COLOR_G, G@STACK_COLOR_B, G@STACK_COLOR_ALT_R, G@STACK_COLOR_ALT_G, G@STACK_COLOR_ALT_B )
			
			G@%tableID%_seat_%A_Index%_bet_size := getTextFromBitmap( G@pBitmap, G@%tableID%_seat_%A_Index%_bet_X, G@%tableID%_seat_%A_Index%_bet_Y, G@%tableID%_bet_area_W, G@%tableID%_bet_area_H, G@BET_COLOR_R, G@BET_COLOR_G, G@BET_COLOR_B )
			
			if G@%tableID%_seat_%A_Index%_stack_size is number
				G@%tableID%_seat_%A_Index%_stack_size := Round(G@%tableID%_seat_%A_Index%_stack_size/G@%tableID%_bigBlind, G@DECIMAL_PLACES)
			if G@%tableID%_seat_%A_Index%_bet_size is number
				G@%tableID%_seat_%A_Index%_bet_size := Round(G@%tableID%_seat_%A_Index%_bet_size/G@%tableID%_bigBlind, G@DECIMAL_PLACES)

		}
		
		G@%tableID%_currentpot_size := getTextFromBitmap( G@pBitmap, G@%tableID%_currentpot_X, G@%tableID%_currentpot_Y, G@%tableID%_currentpot_W, G@%tableID%_currentpot_H, G@CURRENTPOT_COLOR_R, G@CURRENTPOT_COLOR_G, G@CURRENTPOT_COLOR_B )
		
		G@%tableID%_totalpot_size := getTextFromBitmap( G@pBitmap, G@%tableID%_totalpot_X, G@%tableID%_totalpot_Y, G@%tableID%_totalpot_W, G@%tableID%_totalpot_H, G@TOTALPOT_COLOR_R, G@TOTALPOT_COLOR_G, G@TOTALPOT_COLOR_B )
		
		if G@%tableID%_currentpot_size is number
			G@%tableID%_currentpot_size := Round(G@%tableID%_currentpot_size/G@%tableID%_bigBlind, G@DECIMAL_PLACES)
		if G@%tableID%_totalpot_size is number
			G@%tableID%_totalpot_size := Round(G@%tableID%_totalpot_size/G@%tableID%_bigBlind, G@DECIMAL_PLACES)
		
		
		Gdip_DisposeImage(G@pBitmap)
	}	
}



updateTableInfo( tableID ) {
	
	global
	local newX, newY, newW, newH, n
	
	WinGetPos , newX, newY, newW, newH, ahk_id %tableID%
	
	if ( newW != G@%tableID%_clientW )
	{
		newW -= 2*G@winBorderW
		newH -= 2*G@winBorderH + G@winCaptionH
		if !G@%tableID%_SEAT_COUNT
			initializeTable( tableID ) 

		n := G@%tableID%_SEAT_COUNT	
		Loop, %n%
		{
			G@%tableID%_seat_%A_Index%_stack_X 		:= G@%n%_MAX_SEAT_%A_Index%_STACK_DEF_X
			G@%tableID%_seat_%A_Index%_stack_Y 		:= G@%n%_MAX_SEAT_%A_Index%_STACK_DEF_Y			
			G@%tableID%_seat_%A_Index%_stack_OSD_X 	:= G@%n%_MAX_SEAT_%A_Index%_STACK_OSD_DEF_X
			G@%tableID%_seat_%A_Index%_stack_OSD_Y 	:= G@%n%_MAX_SEAT_%A_Index%_STACK_OSD_DEF_Y
			
			G@%tableID%_seat_%A_Index%_bet_X 		:= G@%n%_MAX_SEAT_%A_Index%_BET_DEF_X
			G@%tableID%_seat_%A_Index%_bet_Y 		:= G@%n%_MAX_SEAT_%A_Index%_BET_DEF_Y			
			G@%tableID%_seat_%A_Index%_bet_OSD_X 	:= G@%n%_MAX_SEAT_%A_Index%_BET_OSD_DEF_X
			G@%tableID%_seat_%A_Index%_bet_OSD_Y 	:= G@%n%_MAX_SEAT_%A_Index%_BET_OSD_DEF_Y
			
			calcScaledPos( G@%tableID%_seat_%A_Index%_stack_X, G@%tableID%_seat_%A_Index%_stack_Y, newW, newH )
			calcScaledPos( G@%tableID%_seat_%A_Index%_stack_OSD_X, G@%tableID%_seat_%A_Index%_stack_OSD_Y, newW, newH )
			calcScaledPos( G@%tableID%_seat_%A_Index%_bet_X, G@%tableID%_seat_%A_Index%_bet_Y, newW, newH )
			calcScaledPos( G@%tableID%_seat_%A_Index%_bet_OSD_X, G@%tableID%_seat_%A_Index%_bet_OSD_Y, newW, newH )
			
			G@%tableID%_seat_%A_Index%_stack_X 		+= G@winBorderW
			G@%tableID%_seat_%A_Index%_stack_Y 		+= G@winBorderH + G@winCaptionH	
			G@%tableID%_seat_%A_Index%_bet_X 		+= G@winBorderW
			G@%tableID%_seat_%A_Index%_bet_Y 		+= G@winBorderH + G@winCaptionH	
		}
		
		G@%tableID%_currentpot_X 		:= G@CURRENTPOT_DEF_X
		G@%tableID%_currentpot_Y 		:= G@CURRENTPOT_DEF_Y
		G@%tableID%_currentpot_W 		:= G@CURRENTPOT_DEF_W
		G@%tableID%_currentpot_H 		:= G@CURRENTPOT_DEF_H
		G@%tableID%_currentpot_OSD_X 	:= G@CURRENTPOT_OSD_DEF_X
		G@%tableID%_currentpot_OSD_Y 	:= G@CURRENTPOT_OSD_DEF_Y
		
		G@%tableID%_totalpot_X 			:= G@TOTALPOT_DEF_X
		G@%tableID%_totalpot_Y 			:= G@TOTALPOT_DEF_Y
		G@%tableID%_totalpot_W 			:= G@TOTALPOT_DEF_W
		G@%tableID%_totalpot_H 			:= G@TOTALPOT_DEF_H
		G@%tableID%_totalpot_OSD_X 		:= G@TOTALPOT_OSD_DEF_X
		G@%tableID%_totalpot_OSD_Y 		:= G@TOTALPOT_OSD_DEF_Y
		
		G@%tableID%_my_bet_OSD_X		:= G@MY_BET_OSD_DEF_X
		G@%tableID%_my_bet_OSD_Y		:= G@MY_BET_OSD_DEF_Y
		
		G@%tableID%_stack_area_W	 	:= G@STACK_AREA_DEF_W
		G@%tableID%_stack_area_H	 	:= G@STACK_AREA_DEF_H
		
		G@%tableID%_bet_area_W	 		:= G@BET_AREA_DEF_W
		G@%tableID%_bet_area_H	 		:= G@BET_AREA_DEF_H
		
		calcScaledPos( G@%tableID%_currentpot_X, G@%tableID%_currentpot_Y, newW, newH )
		calcScaledPos( G@%tableID%_currentpot_W, G@%tableID%_currentpot_H, newW, newH )
		calcScaledPos( G@%tableID%_currentpot_OSD_X, G@%tableID%_currentpot_OSD_Y, newW, newH )
		calcScaledPos( G@%tableID%_totalpot_X, G@%tableID%_totalpot_Y, newW, newH )
		calcScaledPos( G@%tableID%_totalpot_W, G@%tableID%_totalpot_H, newW, newH )
		calcScaledPos( G@%tableID%_totalpot_OSD_X, G@%tableID%_totalpot_OSD_Y, newW, newH )
		calcScaledPos( G@%tableID%_my_bet_OSD_X, G@%tableID%_my_bet_OSD_Y, newW, newH )
		calcScaledPos( G@%tableID%_stack_area_W, G@%tableID%_stack_area_H, newW, newH )
		calcScaledPos( G@%tableID%_bet_area_W, G@%tableID%_bet_area_H, newW, newH )
		
		G@%tableID%_currentpot_X 		+= G@winBorderW
		G@%tableID%_currentpot_Y 		+= G@winBorderH + G@winCaptionH	
		G@%tableID%_totalpot_X	 		+= G@winBorderW
		G@%tableID%_totalpot_Y	 		+= G@winBorderH + G@winCaptionH	
	
		; Bets are moving to left if the seat is on the right side of the table
		; so we need to fix the x coordinate
		Loop, % Floor(n/2)
			G@%tableID%_seat_%A_Index%_bet_X -= G@%tableID%_bet_area_W
		
		G@%tableID%_clientW := newW
		
		
	}
	if ( !G@%tableID%_bigBlind || !G@%tableID%_BB_IS_FIXED )
		G@%tableID%_bigBlind := getBigBlind( tableID )
}

updateToolTips() {
	global
	local tableID, n, i
	
	IfWinActive, ahk_group PS_TABLES_GROUP
	{
		tableID := WinExist("A")
		
		n := G@%tableID%_SEAT_COUNT
		i = 1
		if ( G@%tableID%_totalpot_size )
		{
			ToolTip, % G@%tableID%_totalpot_size, G@%tableID%_totalpot_OSD_X, G@%tableID%_totalpot_OSD_Y, %i%
			i++
		}
		Loop, %n%
		{
			if ( G@%tableID%_seat_%A_Index%_stack_size )
			{
				ToolTip, % G@%tableID%_seat_%A_Index%_stack_size, G@%tableID%_seat_%A_Index%_stack_OSD_X, G@%tableID%_seat_%A_Index%_stack_OSD_Y, %i%
				i++
			}
		}
		Loop, %n%
		{
			if ( G@%tableID%_seat_%A_Index%_bet_size )
			{
				ToolTip, % G@%tableID%_seat_%A_Index%_bet_size, G@%tableID%_seat_%A_Index%_bet_OSD_X, G@%tableID%_seat_%A_Index%_bet_OSD_Y, %i%
				i++
			}
		}
		if ( G@%tableID%_currentpot_size )
		{
			ToolTip, % G@%tableID%_currentpot_size, G@%tableID%_currentpot_OSD_X, G@%tableID%_currentpot_OSD_Y, %i%
			i++
		}		
		while ( i < 21 )
		{
			ToolTip,,,, %i%
			i++
		}
	}
	else
	{
		Loop, 20
			ToolTip,,,, %A_Index%
	}
}
Settings.ini
Code:
[SETTINGS]

TABLE_THEME=HyperSimple
DECIMAL_PLACES=1
BB_SCAN_FREQUENCY=650
OSD_UPDATE_FREQUENCY=400

; Until getSeatCount() is properly implemented...
; 2 == Heads up, 6 == 6max, 9 == full ring, etc
; Use 0 if you want to input seat count manually for each table.
DEF_SEAT_COUNT=0

Includes\Lib\CharMap.ahk

Code:
; *** Example ***
; CHAR_62265 := 0

; .........
; ..XXXX...
; ..X..X...
; ..X..X...
; ..X..X...
; ..X..X...
; ..XXXX...
; .........

; 1st column has 6 pixels
; 2nd column has 2 pixels
; 3rd column has 2 pixels
; 4th column has 6 pixels
; last column's lastPixelY - firstPixelY = 5 

; 10 = A, 11 = B, 12 = C, ...

; This only works for recognizing a limited set of chars because some chars have the same code.
; It works really well for numbers though.
; I believe Xander was the one who invented this char recognition method so all credits to him :)

;sf06			sf07			ar08				arb08				arb10
CHAR_42243	:= CHAR_52254	:= CHAR_622265		:= CHAR_682865		:= CHAR_8A22A87		:= 0
CHAR_165	:= CHAR_176		:= CHAR_1187		:= CHAR_22887		:= CHAR_22AA9		:= 1
CHAR_33334	:= CHAR_33335 	:= CHAR_233346		:= CHAR_354646		:= CHAR_3555748		:= 2
CHAR_22333	:= CHAR_22344	:= CHAR_223355		:= CHAR_243855		:= CHAR_2433A77		:= 3
CHAR_23610	:= CHAR_23710	:= CHAR_232810		:= CHAR_2328810		:= CHAR_233AA10		:= 4
CHAR_4334	:= CHAR_53345	:= CHAR_343346		:= CHAR_464646		:= CHAR_4743868		:= 5
CHAR_43321	:= CHAR_53334	:= CHAR_633345		:= CHAR_683745		:= CHAR_7933857		:= 6
CHAR_1521	:= CHAR_14321	:= CHAR_143310		:= CHAR_157421		:= CHAR_1476421		:= 7
CHAR_33333	:= CHAR_43344	:= CHAR_533355		:= CHAR_583855		:= CHAR_7A33A77		:= 8
CHAR_23343	:= CHAR_33354	:= CHAR_433365		:= CHAR_473865		:= CHAR_5833976		:= 9
;CHAR_223221	:= CHAR_2333321	:= CHAR_22424221	:= CHAR_36636632	:= CHAR_2566366521	:= "A"
;CHAR_622243	:= CHAR_7222254	:= CHAR_8222243		:= CHAR_8822865		:= CHAR_AA224865	:= "D"
;CHAR_23323	:= CHAR_333334	:= CHAR_3333335		:= CHAR_4644645		:= CHAR_47545747	:= "S"
CHAR_10											:= CHAR_221								:= "."
;			:= CHAR_10		:= CHAR_10								:= CHAR_221

; ar08 €1,€2,€3,...
CHAR_254444622265	:= 0
CHAR_2544441187		:= 1
CHAR_254444233346	:= 2
CHAR_254444223355	:= 3
CHAR_254444232810	:= 4
CHAR_254444343346	:= 5
CHAR_254444633345	:= 6
CHAR_254444143310	:= 7
CHAR_254444533355	:= 8
CHAR_254444433365	:= 9
Includes\Lib\Gdip.ahk by tic from AHK forums
http://www.autohotkey.com/forum/view...9c1c8f001ecba3

Includes\Themes\HyperSimple.ini
Code:
; The coordinates are from default sized client area!!

[COMMON]

CURRENTPOT_X=334
CURRENTPOT_Y=260
CURRENTPOT_W=140
CURRENTPOT_H=15
CURRENTPOT_OSD_X=355
CURRENTPOT_OSD_Y=268

TOTALPOT_X=375
TOTALPOT_Y=6
TOTALPOT_W=80
TOTALPOT_H=15
TOTALPOT_OSD_X=375
TOTALPOT_OSD_Y=68

MY_BET_OSD_X=10
MY_BET_OSD_Y=10

STACK_AREA_W=91
STACK_AREA_H=15

BET_AREA_W=140
BET_AREA_H=15

STACK_COLOR=192,192,192
STACK_COLOR_ALT=32,32,32
BET_COLOR=255,246,207
TOTALPOT_COLOR=0,0,0
CURRENTPOT_COLOR=255,246,207

[2_MAX]

SEAT_1_STACK_X=671
SEAT_1_STACK_Y=273
SEAT_2_STACK_X=36
SEAT_2_STACK_Y=273

SEAT_1_STACK_OSD_X=671
SEAT_1_STACK_OSD_Y=273
SEAT_2_STACK_OSD_X=36
SEAT_2_STACK_OSD_Y=273

SEAT_1_BET_X=644
SEAT_1_BET_Y=233
SEAT_2_BET_X=151
SEAT_2_BET_Y=233

SEAT_1_BET_OSD_X=639
SEAT_1_BET_OSD_Y=231
SEAT_2_BET_OSD_X=150
SEAT_2_BET_OSD_Y=231



[4_MAX]

SEAT_1_STACK_X=
SEAT_1_STACK_Y=
SEAT_2_STACK_X=
SEAT_2_STACK_Y=
SEAT_3_STACK_X=
SEAT_3_STACK_Y=
SEAT_4_STACK_X=
SEAT_4_STACK_Y=

SEAT_1_STACK_OSD_X=
SEAT_1_STACK_OSD_Y=
SEAT_2_STACK_OSD_X=
SEAT_2_STACK_OSD_Y=
SEAT_3_STACK_OSD_X=
SEAT_3_STACK_OSD_Y=
SEAT_4_STACK_OSD_X=
SEAT_4_STACK_OSD_Y=

SEAT_1_BET_X=
SEAT_1_BET_Y=
SEAT_2_BET_X=
SEAT_2_BET_Y=
SEAT_3_BET_X=
SEAT_3_BET_Y=
SEAT_4_BET_X=
SEAT_4_BET_Y=

SEAT_1_BET_OSD_X=
SEAT_1_BET_OSD_Y=
SEAT_2_BET_OSD_X=
SEAT_2_BET_OSD_Y=
SEAT_3_BET_OSD_X=
SEAT_3_BET_OSD_Y=
SEAT_4_BET_OSD_X=
SEAT_4_BET_OSD_Y=


[6_MAX]

SEAT_1_STACK_X=698
SEAT_1_STACK_Y=105
SEAT_2_STACK_X=691
SEAT_2_STACK_Y=290
SEAT_3_STACK_X=484
SEAT_3_STACK_Y=353
SEAT_4_STACK_X=225
SEAT_4_STACK_Y=353
SEAT_5_STACK_X=13
SEAT_5_STACK_Y=291
SEAT_6_STACK_X=9
SEAT_6_STACK_Y=105

SEAT_1_STACK_OSD_X=702
SEAT_1_STACK_OSD_Y=166
SEAT_2_STACK_OSD_X=630
SEAT_2_STACK_OSD_Y=315
SEAT_2_STACK_OSD_Y=350
SEAT_3_STACK_OSD_X=430
SEAT_3_STACK_OSD_Y=380
SEAT_4_STACK_OSD_X=320
SEAT_4_STACK_OSD_Y=380
SEAT_5_STACK_OSD_X=105
SEAT_5_STACK_OSD_Y=317
SEAT_6_STACK_OSD_X=12
SEAT_6_STACK_OSD_Y=165

SEAT_1_BET_X=598
SEAT_1_BET_Y=166
SEAT_2_BET_X=637
SEAT_2_BET_Y=226
SEAT_3_BET_X=538
SEAT_3_BET_Y=292
SEAT_4_BET_X=246
SEAT_4_BET_Y=292
SEAT_5_BET_X=160
SEAT_5_BET_Y=225
SEAT_6_BET_X=184
SEAT_6_BET_Y=159

SEAT_1_BET_OSD_X=598
SEAT_1_BET_OSD_Y=166
SEAT_2_BET_OSD_X=637
SEAT_2_BET_OSD_Y=226
SEAT_3_BET_OSD_X=538
SEAT_3_BET_OSD_Y=292
SEAT_4_BET_OSD_X=246
SEAT_4_BET_OSD_Y=292
SEAT_5_BET_OSD_X=160
SEAT_5_BET_OSD_Y=225
SEAT_6_BET_OSD_X=184
SEAT_6_BET_OSD_Y=159



[7_MAX]

SEAT_1_STACK_X=
SEAT_1_STACK_Y=
SEAT_2_STACK_X=
SEAT_2_STACK_Y=
SEAT_3_STACK_X=
SEAT_3_STACK_Y=
SEAT_4_STACK_X=
SEAT_4_STACK_Y=
SEAT_5_STACK_X=
SEAT_5_STACK_Y=
SEAT_6_STACK_X=
SEAT_6_STACK_Y=
SEAT_7_STACK_X=
SEAT_7_STACK_Y=

SEAT_1_STACK_OSD_X=
SEAT_1_STACK_OSD_Y=
SEAT_2_STACK_OSD_X=
SEAT_2_STACK_OSD_Y=
SEAT_3_STACK_OSD_X=
SEAT_3_STACK_OSD_Y=
SEAT_4_STACK_OSD_X=
SEAT_4_STACK_OSD_Y=
SEAT_5_STACK_OSD_X=
SEAT_5_STACK_OSD_Y=
SEAT_6_STACK_OSD_X=
SEAT_6_STACK_OSD_Y=
SEAT_7_STACK_OSD_X=
SEAT_7_STACK_OSD_Y=

SEAT_1_BET_X=
SEAT_1_BET_Y=
SEAT_2_BET_X=
SEAT_2_BET_Y=
SEAT_3_BET_X=
SEAT_3_BET_Y=
SEAT_4_BET_X=
SEAT_4_BET_Y=
SEAT_5_BET_X=
SEAT_5_BET_Y=
SEAT_6_BET_X=
SEAT_6_BET_Y=
SEAT_7_BET_X=
SEAT_7_BET_Y=

SEAT_1_BET_OSD_X=
SEAT_1_BET_OSD_Y=
SEAT_2_BET_OSD_X=
SEAT_2_BET_OSD_Y=
SEAT_3_BET_OSD_X=
SEAT_3_BET_OSD_Y=
SEAT_4_BET_OSD_X=
SEAT_4_BET_OSD_Y=
SEAT_5_BET_OSD_X=
SEAT_5_BET_OSD_Y=
SEAT_6_BET_OSD_X=
SEAT_6_BET_OSD_Y=
SEAT_7_BET_OSD_X=
SEAT_7_BET_OSD_Y=



[8_MAX]

SEAT_1_STACK_X=
SEAT_1_STACK_Y=
SEAT_2_STACK_X=
SEAT_2_STACK_Y=
SEAT_3_STACK_X=
SEAT_3_STACK_Y=
SEAT_4_STACK_X=
SEAT_4_STACK_Y=
SEAT_5_STACK_X=
SEAT_5_STACK_Y=
SEAT_6_STACK_X=
SEAT_6_STACK_Y=
SEAT_7_STACK_X=
SEAT_7_STACK_Y=
SEAT_8_STACK_X=
SEAT_8_STACK_Y=

SEAT_1_STACK_OSD_X=
SEAT_1_STACK_OSD_Y=
SEAT_2_STACK_OSD_X=
SEAT_2_STACK_OSD_Y=
SEAT_3_STACK_OSD_X=
SEAT_3_STACK_OSD_Y=
SEAT_4_STACK_OSD_X=
SEAT_4_STACK_OSD_Y=
SEAT_5_STACK_OSD_X=
SEAT_5_STACK_OSD_Y=
SEAT_6_STACK_OSD_X=
SEAT_6_STACK_OSD_Y=
SEAT_7_STACK_OSD_X=
SEAT_7_STACK_OSD_Y=
SEAT_8_STACK_OSD_X=
SEAT_8_STACK_OSD_Y=

SEAT_1_BET_X=
SEAT_1_BET_Y=
SEAT_2_BET_X=
SEAT_2_BET_Y=
SEAT_3_BET_X=
SEAT_3_BET_Y=
SEAT_4_BET_X=
SEAT_4_BET_Y=
SEAT_5_BET_X=
SEAT_5_BET_Y=
SEAT_6_BET_X=
SEAT_6_BET_Y=
SEAT_7_BET_X=
SEAT_7_BET_Y=
SEAT_8_BET_X=
SEAT_8_BET_Y=

SEAT_1_BET_OSD_X=
SEAT_1_BET_OSD_Y=
SEAT_2_BET_OSD_X=
SEAT_2_BET_OSD_Y=
SEAT_3_BET_OSD_X=
SEAT_3_BET_OSD_Y=
SEAT_4_BET_OSD_X=
SEAT_4_BET_OSD_Y=
SEAT_5_BET_OSD_X=
SEAT_5_BET_OSD_Y=
SEAT_6_BET_OSD_X=
SEAT_6_BET_OSD_Y=
SEAT_7_BET_OSD_X=
SEAT_7_BET_OSD_Y=
SEAT_8_BET_OSD_X=
SEAT_8_BET_OSD_Y=

[9_MAX]

SEAT_1_STACK_X=560
SEAT_1_STACK_Y=50
SEAT_2_STACK_X=698
SEAT_2_STACK_Y=105
SEAT_3_STACK_X=691
SEAT_3_STACK_Y=290
SEAT_4_STACK_X=484
SEAT_4_STACK_Y=353
SEAT_5_STACK_X=351
SEAT_5_STACK_Y=430
SEAT_6_STACK_X=225
SEAT_6_STACK_Y=353
SEAT_7_STACK_X=13
SEAT_7_STACK_Y=291
SEAT_8_STACK_X=9
SEAT_8_STACK_Y=105
SEAT_9_STACK_X=151
SEAT_9_STACK_Y=49

SEAT_1_STACK_OSD_X=560
SEAT_1_STACK_OSD_Y=50
SEAT_2_STACK_OSD_X=689
SEAT_2_STACK_OSD_Y=105
SEAT_3_STACK_OSD_X=691
SEAT_3_STACK_OSD_Y=290
SEAT_4_STACK_OSD_X=484
SEAT_4_STACK_OSD_Y=353
SEAT_5_STACK_OSD_X=351
SEAT_5_STACK_OSD_Y=430
SEAT_6_STACK_OSD_X=225
SEAT_6_STACK_OSD_Y=353
SEAT_7_STACK_OSD_X=13
SEAT_7_STACK_OSD_Y=291
SEAT_8_STACK_OSD_X=9
SEAT_8_STACK_OSD_Y=105
SEAT_9_STACK_OSD_X=151
SEAT_9_STACK_OSD_Y=49

SEAT_1_BET_X=509 
SEAT_1_BET_Y=133
SEAT_2_BET_X=596
SEAT_2_BET_Y=168
SEAT_3_BET_X=635
SEAT_3_BET_Y=228
SEAT_4_BET_X=536
SEAT_4_BET_Y=294
SEAT_5_BET_X=374
SEAT_5_BET_Y=293
SEAT_6_BET_X=244
SEAT_6_BET_Y=294
SEAT_7_BET_X=158
SEAT_7_BET_Y=227
SEAT_8_BET_X=182
SEAT_8_BET_Y=161
SEAT_9_BET_X=279
SEAT_9_BET_Y=132

SEAT_1_BET_OSD_X=509
SEAT_1_BET_OSD_Y=133
SEAT_2_BET_OSD_X=591
SEAT_2_BET_OSD_Y=167
SEAT_3_BET_OSD_X=635
SEAT_3_BET_OSD_Y=228
SEAT_4_BET_OSD_X=536
SEAT_4_BET_OSD_Y=294
SEAT_5_BET_OSD_X=374
SEAT_5_BET_OSD_Y=293
SEAT_6_BET_OSD_X=244
SEAT_6_BET_OSD_Y=294
SEAT_7_BET_OSD_X=158
SEAT_7_BET_OSD_Y=227
SEAT_8_BET_OSD_X=182
SEAT_8_BET_OSD_Y=161
SEAT_9_BET_OSD_X=279
SEAT_9_BET_OSD_Y=132

[10_MAX]

SEAT_1_STACK_X=
SEAT_1_STACK_Y=
SEAT_2_STACK_X=
SEAT_2_STACK_Y=
SEAT_3_STACK_X=
SEAT_3_STACK_Y=
SEAT_4_STACK_X=
SEAT_4_STACK_Y=
SEAT_5_STACK_X=
SEAT_5_STACK_Y=
SEAT_6_STACK_X=
SEAT_6_STACK_Y=
SEAT_7_STACK_X=
SEAT_7_STACK_Y=
SEAT_8_STACK_X=
SEAT_8_STACK_Y=
SEAT_9_STACK_X=
SEAT_9_STACK_Y=
SEAT_10_STACK_X=
SEAT_10_STACK_Y=

SEAT_1_STACK_OSD_X=
SEAT_1_STACK_OSD_Y=
SEAT_2_STACK_OSD_X=
SEAT_2_STACK_OSD_Y=
SEAT_3_STACK_OSD_X=
SEAT_3_STACK_OSD_Y=
SEAT_4_STACK_OSD_X=
SEAT_4_STACK_OSD_Y=
SEAT_5_STACK_OSD_X=
SEAT_5_STACK_OSD_Y=
SEAT_6_STACK_OSD_X=
SEAT_6_STACK_OSD_Y=
SEAT_7_STACK_OSD_X=
SEAT_7_STACK_OSD_Y=
SEAT_8_STACK_OSD_X=
SEAT_8_STACK_OSD_Y=
SEAT_9_STACK_OSD_X=
SEAT_9_STACK_OSD_Y=
SEAT_10_STACK_OSD_X=
SEAT_10_STACK_OSD_Y=

SEAT_1_BET_X=
SEAT_1_BET_Y=
SEAT_2_BET_X=
SEAT_2_BET_Y=
SEAT_3_BET_X=
SEAT_3_BET_Y=
SEAT_4_BET_X=
SEAT_4_BET_Y=
SEAT_5_BET_X=
SEAT_5_BET_Y=
SEAT_6_BET_X=
SEAT_6_BET_Y=
SEAT_7_BET_X=
SEAT_7_BET_Y=
SEAT_8_BET_X=
SEAT_8_BET_Y=
SEAT_9_BET_X=
SEAT_9_BET_Y=
SEAT_10_BET_X=
SEAT_10_BET_Y=

SEAT_1_BET_OSD_X=
SEAT_1_BET_OSD_Y=
SEAT_2_BET_OSD_X=
SEAT_2_BET_OSD_Y=
SEAT_3_BET_OSD_X=
SEAT_3_BET_OSD_Y=
SEAT_4_BET_OSD_X=
SEAT_4_BET_OSD_Y=
SEAT_5_BET_OSD_X=
SEAT_5_BET_OSD_Y=
SEAT_6_BET_OSD_X=
SEAT_6_BET_OSD_Y=
SEAT_7_BET_OSD_X=
SEAT_7_BET_OSD_Y=
SEAT_8_BET_OSD_X=
SEAT_8_BET_OSD_Y=
SEAT_9_BET_OSD_X=
SEAT_9_BET_OSD_Y=
SEAT_10_BET_OSD_X=
SEAT_10_BET_OSD_Y=
Includes\Themes\Classic.ini
Code:
; The coordinates are from default sized client area!!

[COMMON]

CURRENTPOT_X=334
CURRENTPOT_Y=260
CURRENTPOT_W=140
CURRENTPOT_H=15
CURRENTPOT_OSD_X=355
CURRENTPOT_OSD_Y=268

TOTALPOT_X=375
TOTALPOT_Y=17
TOTALPOT_W=80
TOTALPOT_H=15
TOTALPOT_OSD_X=375
TOTALPOT_OSD_Y=68

MY_BET_OSD_X=10
MY_BET_OSD_Y=10

STACK_AREA_W=91
STACK_AREA_H=15

BET_AREA_W=140
BET_AREA_H=15

STACK_COLOR=192,192,192
STACK_COLOR_ALT=32,32,32
BET_COLOR=255,246,207
TOTALPOT_COLOR=0,0,0
CURRENTPOT_COLOR=255,246,207

[2_MAX]

SEAT_1_STACK_X=671
SEAT_1_STACK_Y=273
SEAT_2_STACK_X=36
SEAT_2_STACK_Y=273

SEAT_1_STACK_OSD_X=671
SEAT_1_STACK_OSD_Y=273
SEAT_2_STACK_OSD_X=36
SEAT_2_STACK_OSD_Y=273

SEAT_1_BET_X=644
SEAT_1_BET_Y=233
SEAT_2_BET_X=151
SEAT_2_BET_Y=233

SEAT_1_BET_OSD_X=639
SEAT_1_BET_OSD_Y=231
SEAT_2_BET_OSD_X=150
SEAT_2_BET_OSD_Y=231



[4_MAX]

SEAT_1_STACK_X=
SEAT_1_STACK_Y=
SEAT_2_STACK_X=
SEAT_2_STACK_Y=
SEAT_3_STACK_X=
SEAT_3_STACK_Y=
SEAT_4_STACK_X=
SEAT_4_STACK_Y=

SEAT_1_STACK_OSD_X=
SEAT_1_STACK_OSD_Y=
SEAT_2_STACK_OSD_X=
SEAT_2_STACK_OSD_Y=
SEAT_3_STACK_OSD_X=
SEAT_3_STACK_OSD_Y=
SEAT_4_STACK_OSD_X=
SEAT_4_STACK_OSD_Y=

SEAT_1_BET_X=
SEAT_1_BET_Y=
SEAT_2_BET_X=
SEAT_2_BET_Y=
SEAT_3_BET_X=
SEAT_3_BET_Y=
SEAT_4_BET_X=
SEAT_4_BET_Y=

SEAT_1_BET_OSD_X=
SEAT_1_BET_OSD_Y=
SEAT_2_BET_OSD_X=
SEAT_2_BET_OSD_Y=
SEAT_3_BET_OSD_X=
SEAT_3_BET_OSD_Y=
SEAT_4_BET_OSD_X=
SEAT_4_BET_OSD_Y=


[6_MAX]

SEAT_1_STACK_X=698
SEAT_1_STACK_Y=105
SEAT_2_STACK_X=691
SEAT_2_STACK_Y=290
SEAT_3_STACK_X=484
SEAT_3_STACK_Y=353
SEAT_4_STACK_X=225
SEAT_4_STACK_Y=353
SEAT_5_STACK_X=13
SEAT_5_STACK_Y=291
SEAT_6_STACK_X=9
SEAT_6_STACK_Y=105

SEAT_1_STACK_OSD_X=702
SEAT_1_STACK_OSD_Y=166
SEAT_2_STACK_OSD_X=630
SEAT_2_STACK_OSD_Y=315
SEAT_2_STACK_OSD_Y=350
SEAT_3_STACK_OSD_X=430
SEAT_3_STACK_OSD_Y=380
SEAT_4_STACK_OSD_X=320
SEAT_4_STACK_OSD_Y=380
SEAT_5_STACK_OSD_X=105
SEAT_5_STACK_OSD_Y=317
SEAT_6_STACK_OSD_X=12
SEAT_6_STACK_OSD_Y=165

SEAT_1_BET_X=598
SEAT_1_BET_Y=166
SEAT_2_BET_X=637
SEAT_2_BET_Y=226
SEAT_3_BET_X=538
SEAT_3_BET_Y=292
SEAT_4_BET_X=246
SEAT_4_BET_Y=292
SEAT_5_BET_X=160
SEAT_5_BET_Y=225
SEAT_6_BET_X=184
SEAT_6_BET_Y=159

SEAT_1_BET_OSD_X=598
SEAT_1_BET_OSD_Y=166
SEAT_2_BET_OSD_X=637
SEAT_2_BET_OSD_Y=226
SEAT_3_BET_OSD_X=538
SEAT_3_BET_OSD_Y=292
SEAT_4_BET_OSD_X=246
SEAT_4_BET_OSD_Y=292
SEAT_5_BET_OSD_X=160
SEAT_5_BET_OSD_Y=225
SEAT_6_BET_OSD_X=184
SEAT_6_BET_OSD_Y=159



[7_MAX]

SEAT_1_STACK_X=
SEAT_1_STACK_Y=
SEAT_2_STACK_X=
SEAT_2_STACK_Y=
SEAT_3_STACK_X=
SEAT_3_STACK_Y=
SEAT_4_STACK_X=
SEAT_4_STACK_Y=
SEAT_5_STACK_X=
SEAT_5_STACK_Y=
SEAT_6_STACK_X=
SEAT_6_STACK_Y=
SEAT_7_STACK_X=
SEAT_7_STACK_Y=

SEAT_1_STACK_OSD_X=
SEAT_1_STACK_OSD_Y=
SEAT_2_STACK_OSD_X=
SEAT_2_STACK_OSD_Y=
SEAT_3_STACK_OSD_X=
SEAT_3_STACK_OSD_Y=
SEAT_4_STACK_OSD_X=
SEAT_4_STACK_OSD_Y=
SEAT_5_STACK_OSD_X=
SEAT_5_STACK_OSD_Y=
SEAT_6_STACK_OSD_X=
SEAT_6_STACK_OSD_Y=
SEAT_7_STACK_OSD_X=
SEAT_7_STACK_OSD_Y=

SEAT_1_BET_X=
SEAT_1_BET_Y=
SEAT_2_BET_X=
SEAT_2_BET_Y=
SEAT_3_BET_X=
SEAT_3_BET_Y=
SEAT_4_BET_X=
SEAT_4_BET_Y=
SEAT_5_BET_X=
SEAT_5_BET_Y=
SEAT_6_BET_X=
SEAT_6_BET_Y=
SEAT_7_BET_X=
SEAT_7_BET_Y=

SEAT_1_BET_OSD_X=
SEAT_1_BET_OSD_Y=
SEAT_2_BET_OSD_X=
SEAT_2_BET_OSD_Y=
SEAT_3_BET_OSD_X=
SEAT_3_BET_OSD_Y=
SEAT_4_BET_OSD_X=
SEAT_4_BET_OSD_Y=
SEAT_5_BET_OSD_X=
SEAT_5_BET_OSD_Y=
SEAT_6_BET_OSD_X=
SEAT_6_BET_OSD_Y=
SEAT_7_BET_OSD_X=
SEAT_7_BET_OSD_Y=



[8_MAX]

SEAT_1_STACK_X=
SEAT_1_STACK_Y=
SEAT_2_STACK_X=
SEAT_2_STACK_Y=
SEAT_3_STACK_X=
SEAT_3_STACK_Y=
SEAT_4_STACK_X=
SEAT_4_STACK_Y=
SEAT_5_STACK_X=
SEAT_5_STACK_Y=
SEAT_6_STACK_X=
SEAT_6_STACK_Y=
SEAT_7_STACK_X=
SEAT_7_STACK_Y=
SEAT_8_STACK_X=
SEAT_8_STACK_Y=

SEAT_1_STACK_OSD_X=
SEAT_1_STACK_OSD_Y=
SEAT_2_STACK_OSD_X=
SEAT_2_STACK_OSD_Y=
SEAT_3_STACK_OSD_X=
SEAT_3_STACK_OSD_Y=
SEAT_4_STACK_OSD_X=
SEAT_4_STACK_OSD_Y=
SEAT_5_STACK_OSD_X=
SEAT_5_STACK_OSD_Y=
SEAT_6_STACK_OSD_X=
SEAT_6_STACK_OSD_Y=
SEAT_7_STACK_OSD_X=
SEAT_7_STACK_OSD_Y=
SEAT_8_STACK_OSD_X=
SEAT_8_STACK_OSD_Y=

SEAT_1_BET_X=
SEAT_1_BET_Y=
SEAT_2_BET_X=
SEAT_2_BET_Y=
SEAT_3_BET_X=
SEAT_3_BET_Y=
SEAT_4_BET_X=
SEAT_4_BET_Y=
SEAT_5_BET_X=
SEAT_5_BET_Y=
SEAT_6_BET_X=
SEAT_6_BET_Y=
SEAT_7_BET_X=
SEAT_7_BET_Y=
SEAT_8_BET_X=
SEAT_8_BET_Y=

SEAT_1_BET_OSD_X=
SEAT_1_BET_OSD_Y=
SEAT_2_BET_OSD_X=
SEAT_2_BET_OSD_Y=
SEAT_3_BET_OSD_X=
SEAT_3_BET_OSD_Y=
SEAT_4_BET_OSD_X=
SEAT_4_BET_OSD_Y=
SEAT_5_BET_OSD_X=
SEAT_5_BET_OSD_Y=
SEAT_6_BET_OSD_X=
SEAT_6_BET_OSD_Y=
SEAT_7_BET_OSD_X=
SEAT_7_BET_OSD_Y=
SEAT_8_BET_OSD_X=
SEAT_8_BET_OSD_Y=

[9_MAX]

SEAT_1_STACK_X=560
SEAT_1_STACK_Y=50
SEAT_2_STACK_X=698
SEAT_2_STACK_Y=105
SEAT_3_STACK_X=691
SEAT_3_STACK_Y=290
SEAT_4_STACK_X=484
SEAT_4_STACK_Y=353
SEAT_5_STACK_X=351
SEAT_5_STACK_Y=430
SEAT_6_STACK_X=225
SEAT_6_STACK_Y=353
SEAT_7_STACK_X=13
SEAT_7_STACK_Y=291
SEAT_8_STACK_X=9
SEAT_8_STACK_Y=105
SEAT_9_STACK_X=151
SEAT_9_STACK_Y=49

SEAT_1_STACK_OSD_X=560
SEAT_1_STACK_OSD_Y=50
SEAT_2_STACK_OSD_X=689
SEAT_2_STACK_OSD_Y=105
SEAT_3_STACK_OSD_X=691
SEAT_3_STACK_OSD_Y=290
SEAT_4_STACK_OSD_X=484
SEAT_4_STACK_OSD_Y=353
SEAT_5_STACK_OSD_X=351
SEAT_5_STACK_OSD_Y=430
SEAT_6_STACK_OSD_X=225
SEAT_6_STACK_OSD_Y=353
SEAT_7_STACK_OSD_X=13
SEAT_7_STACK_OSD_Y=291
SEAT_8_STACK_OSD_X=9
SEAT_8_STACK_OSD_Y=105
SEAT_9_STACK_OSD_X=151
SEAT_9_STACK_OSD_Y=49

SEAT_1_BET_X=509 
SEAT_1_BET_Y=133
SEAT_2_BET_X=596
SEAT_2_BET_Y=168
SEAT_3_BET_X=635
SEAT_3_BET_Y=228
SEAT_4_BET_X=536
SEAT_4_BET_Y=294
SEAT_5_BET_X=374
SEAT_5_BET_Y=293
SEAT_6_BET_X=244
SEAT_6_BET_Y=294
SEAT_7_BET_X=158
SEAT_7_BET_Y=227
SEAT_8_BET_X=182
SEAT_8_BET_Y=161
SEAT_9_BET_X=279
SEAT_9_BET_Y=132

SEAT_1_BET_OSD_X=509
SEAT_1_BET_OSD_Y=133
SEAT_2_BET_OSD_X=591
SEAT_2_BET_OSD_Y=167
SEAT_3_BET_OSD_X=635
SEAT_3_BET_OSD_Y=228
SEAT_4_BET_OSD_X=536
SEAT_4_BET_OSD_Y=294
SEAT_5_BET_OSD_X=374
SEAT_5_BET_OSD_Y=293
SEAT_6_BET_OSD_X=244
SEAT_6_BET_OSD_Y=294
SEAT_7_BET_OSD_X=158
SEAT_7_BET_OSD_Y=227
SEAT_8_BET_OSD_X=182
SEAT_8_BET_OSD_Y=161
SEAT_9_BET_OSD_X=279
SEAT_9_BET_OSD_Y=132

[10_MAX]

SEAT_1_STACK_X=
SEAT_1_STACK_Y=
SEAT_2_STACK_X=
SEAT_2_STACK_Y=
SEAT_3_STACK_X=
SEAT_3_STACK_Y=
SEAT_4_STACK_X=
SEAT_4_STACK_Y=
SEAT_5_STACK_X=
SEAT_5_STACK_Y=
SEAT_6_STACK_X=
SEAT_6_STACK_Y=
SEAT_7_STACK_X=
SEAT_7_STACK_Y=
SEAT_8_STACK_X=
SEAT_8_STACK_Y=
SEAT_9_STACK_X=
SEAT_9_STACK_Y=
SEAT_10_STACK_X=
SEAT_10_STACK_Y=

SEAT_1_STACK_OSD_X=
SEAT_1_STACK_OSD_Y=
SEAT_2_STACK_OSD_X=
SEAT_2_STACK_OSD_Y=
SEAT_3_STACK_OSD_X=
SEAT_3_STACK_OSD_Y=
SEAT_4_STACK_OSD_X=
SEAT_4_STACK_OSD_Y=
SEAT_5_STACK_OSD_X=
SEAT_5_STACK_OSD_Y=
SEAT_6_STACK_OSD_X=
SEAT_6_STACK_OSD_Y=
SEAT_7_STACK_OSD_X=
SEAT_7_STACK_OSD_Y=
SEAT_8_STACK_OSD_X=
SEAT_8_STACK_OSD_Y=
SEAT_9_STACK_OSD_X=
SEAT_9_STACK_OSD_Y=
SEAT_10_STACK_OSD_X=
SEAT_10_STACK_OSD_Y=

SEAT_1_BET_X=
SEAT_1_BET_Y=
SEAT_2_BET_X=
SEAT_2_BET_Y=
SEAT_3_BET_X=
SEAT_3_BET_Y=
SEAT_4_BET_X=
SEAT_4_BET_Y=
SEAT_5_BET_X=
SEAT_5_BET_Y=
SEAT_6_BET_X=
SEAT_6_BET_Y=
SEAT_7_BET_X=
SEAT_7_BET_Y=
SEAT_8_BET_X=
SEAT_8_BET_Y=
SEAT_9_BET_X=
SEAT_9_BET_Y=
SEAT_10_BET_X=
SEAT_10_BET_Y=

SEAT_1_BET_OSD_X=
SEAT_1_BET_OSD_Y=
SEAT_2_BET_OSD_X=
SEAT_2_BET_OSD_Y=
SEAT_3_BET_OSD_X=
SEAT_3_BET_OSD_Y=
SEAT_4_BET_OSD_X=
SEAT_4_BET_OSD_Y=
SEAT_5_BET_OSD_X=
SEAT_5_BET_OSD_Y=
SEAT_6_BET_OSD_X=
SEAT_6_BET_OSD_Y=
SEAT_7_BET_OSD_X=
SEAT_7_BET_OSD_Y=
SEAT_8_BET_OSD_X=
SEAT_8_BET_OSD_Y=
SEAT_9_BET_OSD_X=
SEAT_9_BET_OSD_Y=
SEAT_10_BET_OSD_X=
SEAT_10_BET_OSD_Y=
Spoiler:
New AHK script: PS MoneyToBB (working prototype) Quote
03-04-2011 , 03:09 PM
whats new in this one that you just posted?

where is Xander's ocr method, is it from PokerPad?

Last edited by greg nice; 03-04-2011 at 03:15 PM.
New AHK script: PS MoneyToBB (working prototype) Quote
03-04-2011 , 04:28 PM
I'm in a hurry right now so I'll try to answer questions later. But check out getTextFromBitmap(), it's pretty cool IMO. I use machine code in it so it's pretty fast.

I can't remember which Xander's script it was but here's something he has posted to the AHK forums:
http://www.autohotkey.net/~Xander/ODR.ahk. I do it a bit differently I guess because I had to write it C..
New AHK script: PS MoneyToBB (working prototype) Quote
03-04-2011 , 06:18 PM
Oh wow working custom MCode? I could never get even the simplest of C to work, tried using bloodshed and some MS visual C++ express iirc. even trying examples my computer produced different ASM than in the thread if you get some time can you elaborate how you did it? not important though, can't even remember what I wanted mcode working for now

also - is this the updated one that works for varied table sizes?
New AHK script: PS MoneyToBB (working prototype) Quote
03-04-2011 , 08:30 PM
Quote:
Originally Posted by greg nice
where is Xander's ocr method, is it from PokerPad?
PokerPad maybe, can't really remember where I saw it the first time but I'm quite sure Xander was the one who invented this method. I believe the same method has also been used in nanochip's PokerShortcuts and Max1mums' StarsCash. My implementation will probably look quite different from theirs though but the main idea is the same.

Quote:
Originally Posted by greg nice
whats new in this one that you just posted?
This is what is new:



Plus the fact that you don't have to use a fixed table size

You can test it your self by opening a default sized full ring NLHE table and running this script.
Code:
;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other <myemail@nowhere.com>
;
; Script Function:
;	Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

#Include CharMap.ahk
#Include Gdip.ahk
SetBatchLines, -1

SysGet, G@winCaptionH, 4
SysGet, G@winBorderH, 33
SysGet, G@winBorderW, 32


x := 698 + G@winBorderW
y := 105 + G@winBorderH + G@winCaptionH
tables := 24
stacksAndBetsAndPots := 20 ; full ring table has 9 stacks, 9 bets, 2 pots = 20 things to read
n := tables*stacksAndBetsAndPots


if !winID := WinExist("ahk_class PokerStarsTableFrameClass")
	ExitApp
pToken := Gdip_Startup()
timer := A_TickCount
Loop, %tables%
{
	pBitmap := Gdip_BitmapFromScreen("hwnd:" winID)
	
	Loop, %stacksAndBetsAndPots%
	{
		txt := getTextFromBitmap( pBitmap, x, y, 91, 15, 192, 192, 192, 32, 32, 32 )
	}
	Gdip_DisposeImage(pBitmap)
}
timer := A_TickCount - timer
timerOneTable := Round(timer/24, 2)
Gdip_Shutdown(pToken)

MsgBox, Seat 2 stack size: %txt%`n`n%tables% tables * [9 stacks + 9 bets + 2 pots] = %n% things to read`n`n%n% reads took %timer%ms`n`nSo it takes about %timerOneTable%ms to read everything from one table.


return

getTextFromBitmap( pBitmap, x, y, w, h, txtR, txtG, txtB, txtAltR=-1, txtAltG=-1, txtAltB=-1 )
{
	global
	local MCode_getCharCodesFromBitmap, E, Stride, Scan0, BitmapData, charCode, txt
	static getCharCodesFromBitmap, charCodes, initialized
	
	if !initialized
	{		
		MCode_getCharCodesFromBitmap := "83EC20565733FF33F6897C240C897C2410397C24300"
		. "F8E5B0100008B4424548B5424348B4C241C53558DA4240000000083CDFF896C2420896C241"
		. "033DB33ED85D20F8ED90000008B4424348D50018D0CBA8BF82BFA83C7022BC2897C242C894"
		. "42428EB048B4424288B54242C0FB6140A0FB604080FB6398944241C3B54244475103B7C244"
		. "8750A8B44244C3944241C74163B54245075243B7C2454751E8B5424583954241C7514837C2"
		. "410FF7504896C24108BC58944242043EB048B4424208B54243C034C2440453BEA7C9885DB7"
		. "4442B442410C7442414010000008BC88B44245C894C242483FB0A7D0880C330881C06EB118"
		. "3FB247D0880C337881C06EB04C604063F8B5C24388B7C24184B463BFB7541EB138B4C24248"
		. "B7C24188B44245C837C241400742C83F90A7D088D5930881C06EB1183F9247D088D5937881"
		. "C06EB04C604063F46C604060A46C74424140000000047897C24183B7C24380F8CCEFEFFFF5"
		. "D5B85F6740EC64406FF005F8D46FF5E83C420C35F8BC65E83C420C3"
		VarSetCapacity(getCharCodesFromBitmap, StrLen(MCode_getCharCodesFromBitmap)//2)
		Loop % StrLen(MCode_getCharCodesFromBitmap)//2
			NumPut("0x" SubStr(MCode_getCharCodesFromBitmap, (2*A_Index)-1, 2), getCharCodesFromBitmap, A_Index-1, "char")
		VarSetCapacity( charCodes, 2048 )
		initialized := 1
	}
	
	if E := Gdip_LockBits(pBitmap, x, y, w, h, Stride, Scan0, BitmapData)
		return, "LockBits Error " . E
	charCodes := ""
	DllCall(&getCharCodesFromBitmap,"uint",Scan0,"int",w,"int",h,"int",Stride,"int",txtR,"int",txtG,"int",txtB,"int",txtAltR,"int",txtAltG,"int",txtAltB,"char",&charCodes )
	Gdip_UnlockBits(pBitmap, BitmapData)
	VarSetCapacity( charCodes, -1 )
	Loop, Parse, charCodes, `n
	{
		charCode := "CHAR_" . A_LoopField
		txt .= %charCode%
	}
	return txt
}
OK, I'm only reading the seat 2 stack size 20 times from 24 different bitmaps but it shouldn't be any different when reading everything correctly. You'll just have to change the x,y,w,h parameters to read some other location.

Quote:
Originally Posted by _dave_
Oh wow working custom MCode? I could never get even the simplest of C to work, tried using bloodshed and some MS visual C++ express iirc. even trying examples my computer produced different ASM than in the thread if you get some time can you elaborate how you did it? not important though, can't even remember what I wanted mcode working for now

also - is this the updated one that works for varied table sizes?
I used MCodeGen.ahk to create it. It works perfectly when you have Visual C++ 2010 Express installed on your computer. Check it out!

And yes, this version should work with every table size. Well almost..
I haven't bothered to map the characters above default table size yet, so that is the max table size at the moment. It's not a big job though.
I've also only tested this with NLHE tables and I believe there are some minor bet location differences when playing Omaha and other games. But the getTextFromBitmap() function is pretty flexible because I don't need to know the exact location of the text, just some rectangular area where it should be. So hopefully it can be fixed by just making the scan area height bigger.

One quite annoying bug is that when there are two table bets close to each other, it will register both bets to one player and the result is usually something very weird. It's because the damn text is moving along with the chip graphics and I have to use very wide scan areas. Have to think about how to fix that.. There's probably a million other bugs too

But the version I just posted isn't really meant to be a 'final version' for everyday use, it's more about showing the getTextFromBitmap() function. Although I'm not exactly happy about the script's current performance.. But I honestly don't think it's the char scanning that is causing the CPU increase. I think I'm not doing the HUD (tooltips lol) updating very efficiently or something.

edit.
BTW I'm not sure if this will work with 64bit machines because of the machine code..

Last edited by Weegs; 03-04-2011 at 08:48 PM.
New AHK script: PS MoneyToBB (working prototype) Quote
03-04-2011 , 08:50 PM
The test script seems to work for me but the $$ for bb script is returning a Lockbit Error 2 error msg...any ideas?

Great work btw.
New AHK script: PS MoneyToBB (working prototype) Quote
03-04-2011 , 09:58 PM
Quote:
Originally Posted by YoureToast
The test script seems to work for me but the $$ for bb script is returning a Lockbit Error 2 error msg...any ideas?

Great work btw.
Hmm, it's a Gdip_Lockbits() error where the function has gotten an invalid parameter. The script isn't creating a bitmap from the table correctly.

Does the test script show you the correct stack size from seat 2? Not just the XXXms stuff?

You did get the Gdip.ahk from http://www.autohotkey.com/forum/view...9c1c8f001ecba3. Are you sure that all the files & folders are named correctly and in correct places? Like this:

MainFolderWhatever\$$$_to_bb.ahk
MainFolderWhatever\Settings.ini
MainFolderWhatever\Includes\Lib\CharMap.ahk
MainFolderWhatever\Includes\Lib\Gdip.ahk
MainFolderWhatever\Includes\Themes\HyperSimple.ini
MainFolderWhatever\Includes\Themes\Classic.ini

Or just download and unzip this http://www.mediafire.com/?go6degpxwpeiffd. It has everything and works for me.


Do you have a 32 or 64 bit machine? I'm not sure whether this works with 64bit machines because of the MCode.

I've only tested this with Win7 but I'm quite sure this should work with XP and Vista. Older Windows will probably have some Gdip issues.
New AHK script: PS MoneyToBB (working prototype) Quote
03-04-2011 , 10:24 PM
I got it to work with the direct download...very nice.

I think misplaced 2 of the files which is why it didn't work.

Anyway, are there any plans to have the have the amounts displayed in place of the actual $ amounts?
New AHK script: PS MoneyToBB (working prototype) Quote
03-04-2011 , 10:49 PM
Good to hear! The script is still in very early stages so it might not look very pretty. I'm using tooltips at the moment because it's an easy way to show stuff.

You can change the tooltip locations by changing the coordinates in HyperSimple.ini. Just look for things that have OSD (OnScreenDisplay) in it.

Code:
[6_MAX]
SEAT_1_STACK_OSD_X=702
SEAT_1_STACK_OSD_Y=166
....
....
SEAT_3_BET_OSD_X=598
SEAT_3_BET_OSD_Y=166
edit.
If you mean replacing the original text in PS client then no, that won't happen. You would need to do some memory reading & writing and I have no idea how to do that. I believe there is some program that can do it though.

Last edited by Weegs; 03-04-2011 at 10:58 PM.
New AHK script: PS MoneyToBB (working prototype) Quote
03-05-2011 , 01:18 AM
Excellent work, thanks for this!
New AHK script: PS MoneyToBB (working prototype) Quote
03-05-2011 , 11:20 AM
this char recognition seems similar to the one used in OpenHoldem, but i havent looked at that too deeply. maybe you can get more ideas from there

thats very impressive scanning time, but i see that youre using gdip_bitmapfromscreen, which in turn simply uses GetDCEx. so i'm curious if this will work on overlapped tables on WinXP, cause in those cases usually the bottleneck comes from using PrintWindow instead to get the screenshot cause GetDCEx wont work on overlapped windows without Aero theme

Last edited by greg nice; 03-05-2011 at 11:32 AM.
New AHK script: PS MoneyToBB (working prototype) Quote

      
m