Open Side Menu Go to the Top
Register
Table Counter AHK for PokerStars Table Counter AHK for PokerStars

09-15-2013 , 07:16 PM
Guys I'm not really good in computer but I really want a basic table counter wich would only give me the number of table that i'm playing on. Where can I get that?

Thanks a lot
Table Counter AHK for PokerStars Quote
09-17-2013 , 07:04 PM
Dax' counter does exactly that, see post #1 (OP).
Table Counter AHK for PokerStars Quote
09-18-2013 , 07:02 AM
Yep I know, I just don't know how to use a script.. althought I'm gonna try to figure it out by myself! Looks awsome I really needed that "tool".
Thanks guys!
Table Counter AHK for PokerStars Quote
09-18-2013 , 09:21 AM
I succeed! Beeing able to create something like that is just awesome! You guys are genius! Thanks it's gonna be really helpfull
Table Counter AHK for PokerStars Quote
09-22-2013 , 04:24 PM
Quote:
Originally Posted by Baobhan-Sith
Dax' counter does exactly that, see post #1 (OP).
Does this still work ? and how do i get it to work ?

Not used a AHK before.
Table Counter AHK for PokerStars Quote
09-23-2013 , 12:29 PM
I just wanted a table counter like MeleaB asked for and i used the script created by greg nice.

Seems to work great ... thanks greg nice.
Table Counter AHK for PokerStars Quote
09-27-2013 , 08:49 AM
Hi I search a prgram or ahk script that can count my open tables and session timer and hands i have played and show how much i lost or win during a session, this is for cash game and table counter is for sng. If this is not out on the market i will pay someone to make this
Table Counter AHK for PokerStars Quote
09-29-2013 , 07:40 PM
Quote:
Originally Posted by PoPenDeX
Hi I search a prgram or ahk script that can count my open tables and session timer and hands i have played and show how much i lost or win during a session, this is for cash game and table counter is for sng. If this is not out on the market i will pay someone to make this
LoL it's called a HUD mate.. You should google "Holdem manager2 "..
Table Counter AHK for PokerStars Quote
09-30-2013 , 10:23 AM
I have hem2. But I will have the details while I play. Table counter like it is now is also what hem2 can do.
Table Counter AHK for PokerStars Quote
10-03-2013 , 02:51 AM
Quote:
Originally Posted by Baobhan-Sith
NP, this should do it, lmk if it doesn't:

Code:
#SingleInstance, force
#NoTrayIcon
DetectHiddenWindows, On
SetTitleMatchMode, 2					;1=start 2=contain 3=exact match

;======================================================= CONFIG SECTION =========================================================

SoundBust = C:\Program Files (x86)\PokerStars\snd\bust.wav		;sound if table closes
SoundAchieve = C:\Program Files (x86)\PokerStars\snd\ding.wav	;sound if TotalLimit reached

GuiPos = x5 y5						;position of GUI on screen 
										;move the window where you want it to be, then use WindowSpy to grab its coords
										
LoopInterval = 100						;counter update interval in msec (1000 = 1sec, default = 100)

Stake1 = $3.50+R						;eg. "$3.50+R"
Stake2 = $8.00							;eg. "$8.00"
Stake3 = $15.00							;eg. "$15.00"
Stake4 = Gtd							;eg. "Gtd"

Color1 = 00AAFF 						;color for table counter - stake1 
Color2 = FF66FF							;color for table counter - stake2 
Color3 = 58FAAC							;color for table counter - stake3 
Color4 = ffff00 						;color for table counter - stake4 

CurrentLimit = 14						;desired table limit (current)
TotalLimit = 100						;desired table limit (session)
SoundInterval = 25						;SoundAchieve replays after "TotalLimit" + N tables
SessionTimeLimit = 6:00					;desired session time limit (h:mm)
MaxABI = 25								;maximum desired ABI (session)

LimitColor = 33FF33						;color of 'SessionTime' and 'TotalTables' counters after reaching their set limits 
ClockColorBreak = FF0000				;clock color indicating sync tourney break (CCCCCC to disable this option)

RebuyMulti = 3						;stake multiplier for rebuy tourneys (ABI/Stake) 
										;!!!EDIT LINE 392!!! 


;=========================================== CONFIG HOTKEYS AT BOTTOM OF THE SCRIPT =============================================

;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

;============================================================ GUI ===============================================================

Gui -MaximizeBox -Resize +AlwaysOnTop +ToolWindow -MinimizeBox
Gui, Show, %GuiPos%
Gui, Show, W194 H316, SessionMan 2.1.1				
Gui, Color, 000000		
;___________________________________________________________ TOTALS _____________________________________________________________
						
Gui, Font, s22 cCCCCCC, Verdana					
Gui, Add, Text, x-8 y1 vTotalTables Center, 00000 / 00000	
								
Gui, Font, s18 c555555, Verdana					
Gui, Add, Text, x7 y14 Center, ____________				
;___________________________________________________________ STAKE 1 ____________________________________________________________
									
Gui, Font, s8 c%Color1%, Verdana				
Gui, Add, Text, x27 y45 vControl1 Center, 00000000000000000000
								
Gui, Font, s16 c%Color1%, Verdana				
Gui, Add, Text, x20 y57 vStake1 Center, 00000 / 00000		
;........................................................... STAKE 2 ............................................................
								
Gui, Font, s8 c%Color2%, Verdana				
Gui, Add, Text, x27 y89 vControl2 Center, 00000000000000000000
								
Gui, Font, s16 c%Color2%, Verdana				
Gui, Add, Text, x20 y101 vStake2 Center, 00000 / 00000		
;........................................................... STAKE 3 ............................................................
								
Gui, Font, s8 c%Color3%, Verdana				
Gui, Add, Text, x27 y133 vControl3 Center, 00000000000000000000
								
Gui, Font, s16 c%Color3%, Verdana				
Gui, Add, Text, x20 y145 vStake3 Center, 00000 / 00000		
;........................................................... STAKE 4 ............................................................
								
Gui, Font, s8 c%Color4%, Verdana				
Gui, Add, Text, x27 y177 vControl4 Center, 00000000000000000000
								
Gui, Font, s16 c%Color4%, Verdana			
Gui, Add, Text, x20 y189 vStake4 Center, 00000 / 00000	
;____________________________________________________________ BUYIN _____________________________________________________________
								
Gui, Font, s18 c555555, Verdana					
Gui, Add, Text, x7 y194 Center, ____________			
								
;Gui, Font, s14 cCCCCCC, Verdana					
;Gui, Add, Text, x-6 y272 vDollars Center, $0000.00 / $0000.00	
								
Gui, Font, s14 c999999, Verdana					
Gui, Add, Text, x51 y225 vTotalABI Center, $0000.00 
;___________________________________________________________ CLOCK/TIME _________________________________________________________
								
Gui, Font, s18 c555555, Verdana					
Gui, Add, Text, x7 y229 Center, ____________			
								
Gui, Font, s20 cCCCCCC, Verdana					
Gui, Add, Text, x41 y257 vClock Center, 000:000			
								
Gui, Font, s12 c999999, Verdana					
Gui, Font, Bold						
Gui, Add, Text, x73 y292 vSessionTime Center, 00:00		
;================================================================================================================================	

GuiControl,, Control1, %Stake1%
GuiControl,, Control2, %Stake2%
GuiControl,, Control3, %Stake3%
GuiControl,, Control4, %Stake4%
;--------------------------------------------------------------------------------------------------------------------------------

Buyin_Total := 0.00
Buyin_Total_TournamentCounter := 0

H = 0
M1 = 0
M2 = -1

r0 = 0
r1 = 0
r2 = 0
r3 = 0
r4 = 0

t1 = 0
t2 = 0
t3 = 0
t4 = 0
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


Loop
{
;------------------------------------------------------------ STAKE 1 -----------------------------------------------------------
  
    v1 := 0
    c1 := 0

    WinGet, v1, count, %Stake1% ahk_class PokerStarsTableFrameClass

    Loop, %v1%
    	{	
    	c1 += 1
    	}

    if (t1 = 0)
		{
		GuiControl,, Stake1, 0 / 0
    	r1 = 0
		}

    if (t1 < c1)
		{
		t1 := c1 - 1
		}

    if (c1 > r1)
    	{
		t1++
    	GuiControl,, Stake1, %c1% / %t1%
    	r1 = %c1%
    	}

	else, if (c1 < r1)
    	{
		GuiControl,, Stake1, %c1% / %t1%
      	r1 = %c1%
    	}
;----------------------------------------------------------- STAKE 2 ------------------------------------------------------------

    v2 := 0
    c2 := 0

    WinGet, v2, count, %Stake2% ahk_class PokerStarsTableFrameClass

    Loop, %v2%
    	{	
    	c2 += 1
    	}

    if (t2 = 0)
		{
		GuiControl,, Stake2, 0 / 0
    	r2 = 0
		}

    if (t2 < c2)
		{
		t2 := c2 - 1
		}

    if (c2 > r2)
    	{
		t2++
    	GuiControl,, Stake2, %c2% / %t2%
    	r2 = %c2%
    	}

	else, if (c2 < r2)
    	{
		GuiControl,, Stake2, %c2% / %t2%
      	r2 = %c2%
    	}
;----------------------------------------------------------- STAKE 3 ------------------------------------------------------------

    v3 := 0
    c3 := 0

    WinGet, v3, count, %Stake3% ahk_class PokerStarsTableFrameClass

    Loop, %v3%
    	{	
    	c3 += 1
    	}

    if (t3 = 0)
		{
		GuiControl,, Stake3, 0 / 0
    	r3 = 0
		}

    if (t3 < c3)
		{
		t3 := c3 - 1
		}

    if (c3 > r3)
    	{
		t3++
    	GuiControl,, Stake3, %c3% / %t3%
     	r3 = %c3%
    	}

	else, if (c3 < r3)
    	{
		GuiControl,, Stake3, %c3% / %t3%
      	r3 = %c3%
    	}
;----------------------------------------------------------- STAKE 4 ------------------------------------------------------------

    v4 := 0
    c4 := 0

    WinGet, v4,count, %Stake4% ahk_class PokerStarsTableFrameClass 

    Loop, %v4%
    	{	
    	c4 += 1
    	}

    if (t4 = 0)
		{
		GuiControl,, Stake4, 0 / 0
    	r4 = 0
		}

    if (t4 < c4)
		{
		t4 := c4 - 1
		}

    if (c4 > r4)
    	{
		t4++
    	GuiControl,, Stake4, %c4% / %t4%
    	 r4 = %c4%
    	}

	else, if (c4 < r4)
    	{
		GuiControl,, Stake4, %c4% / %t4%
      	r4 = %c4%
    	}

;----------------------------------------------------------- TOTALS -------------------------------------------------------------

    c0 := c1 + c2 + c3 + c4 
    t0 := t1 + t2 + t3 + t4 

    GuiControl,, TotalTables, %c0% / %t0%

    if (c0 < r0)
    	{
		SoundPlay, %SoundBust%
    	}
	
    r0 = %c0%

    if (c0 < CurrentLimit)
		{
		Gui, Font, s22 cCCCCCC, Verdana
		GuiControl, Font, TotalTables
		}

	else, if (c0 >= CurrentLimit)
		{
		Gui, Font, s22 c%LimitColor%, Verdana
		GuiControl, Font, TotalTables
		}

    if (t0 = TotalLimit)
    	{
		SoundPlay, %SoundAchieve%
		TotalLimit := t0 + SoundInterval
    	}
;----------------------------------------------------------- BUYIN --------------------------------------------------------------

Buyin_Dollars:=0.00
Buyin_Dollars_TournamentCounter:=0
Buyin_Euro:=0.00
Buyin_Euro_TournamentCounter:=0
Buyin_Session:=0.00	
Buyin_Session_TournamentCounter:=0
		
Winget,Ps_Hwnd_list,List,Ahk_Class PokerStarsTableFrameClass

Loop %Ps_Hwnd_List%
{
	Hwnd:=Ps_Hwnd_List%A_index%
	IF  !(Buyin_%hwnd%)
		{
		WingetTitle,Title,Ahk_id%Hwnd%
		IF Instr(Title,"Tournament")
			{
			IF Buyin_%Hwnd%:=GetBuyin(Title,Buyin_%Hwnd%_Currency)
				{
 				BuyIn_hwnd_list:=BuyIn_hwnd_list ? BuyIn_hwnd_list "," Hwnd : Hwnd
				Buyin_Total:=Round(Buyin_Total+Buyin_%Hwnd%,2)
			    	Buyin_Total_TournamentCounter+=1
				}
			}
		}			
}	

Loop,Parse,Buyin_Hwnd_List,`,,
{
        Hwnd:=A_LoopField      
	IF WinExist("ahk_id" Hwnd)
        	{
		Currency:=Buyin_%hwnd%_Currency	
		Buyin:=Round(Buyin_%hwnd%,2)
		IF (Currency="$")
			{	
			Buyin_Dollars:=Round(Buyin_Dollars+Buyin,2)
		        Buyin_Dollars_TournamentCounter+=1
			}
		Else  IF (Currency="€")
			{		
			Buyin_Euro:=Round(Buyin_Euro+Buyin,2)
			Buyin_Euro_TournamentCounter+=1
			}		
		Buyin_Session:=Round(Buyin_Session+Buyin,2)
		Buyin_Session_TournamentCounter+=1
		}
	Else
                { 
		Temp_list:="," Buyin_Hwnd_List "," 
		StringReplace,Temp_list,Temp_list,`,Hwnd`,,,    
	        StringTrimLeft,Temp_list,Temp_list,1
		StringTrimRight,Buyin_Hwnd_List,Temp_list,1       
		}
}	
	
IF (BuyIn_Dollars_Save != BuyIn_Dollars) Or (BuyIn_Euro_Save != BuyIn_Euro) 
{
	BuyIn_Euro_Save:=BuyIn_Euro	
	BuyIn_Euro_Avg:= Round(BuyIn_Euro/BuyIn_Euro_TournamentCounter,2)		
	BuyIn_Dollars_Save:=BuyIn_Dollars
	BuyIn_Dollars_Avg:=Round(BuyIn_Dollars/BuyIn_Dollars_TournamentCounter,2)
	BuyIn_Session_Avg:=Round(BuyIn_Session/BuyIn_Session_TournamentCounter,2)
	BuyIn_Total_Avg:=Round(BuyIn_Total/BuyIn_Total_TournamentCounter,2)
		;GuiControl,,Dollars,% "$" Buyin_Dollars_Avg " / $" BuyIn_Dollars
		GuiControl,,TotalABI,% "$" BuyIn_Total_Avg "" ;/ $" BuyIn_Total
}

GetBuyin(Title,byref currency="",Byref BuyinText="")
	{
	Static CurrencyList:="$,€"
 	Haystack:=Substr(Title, Instr(Title,"Sat:")+1) ;This is for satiliets
    Loop,Parse,Currencylist,`,
    	{
        IF ((StartPosBuyin := Instr(Haystack,A_loopField)) And (EndPosBuyin := Instr(Haystack,A_space,"",StartPosBuyin)))
          	{          
           	BuyinText:=Substr(Haystack,StartPosBuyin ,(EndPosBuyin - StartPosBuyin))
         	Currency=%A_loopField%
          	Buyin:=BuyinText
	  		StringReplace,Buyin,Buyin,%Currency%,, 
			IfInString, Buyin, +R
				{	
          		StringReplace,Buyin,Buyin,+R,, 
				RebuyMulti = 3
				Buyin := Buyin * RebuyMulti					
				}
             
			IF Buyin is not number
				{ 
				Buyin:=0
				currency:=
				buyinText:=    
				}
			Break     
			}
		}
	Return Buyin 
	}
;----------------------------------------------------------- CLOCK --------------------------------------------------------------

FormatTime, Time, %A_Now%, H:mm
GuiControl,, Clock, %Time%
StringTrimLeft, TimeOnly, A_Now, 10
StringTrimRight, Minutes, TimeOnly, 2
IfGreaterOrEqual, Minutes, 55
	{
	Gui, Font, s20 c%ClockColorBreak%
	Gui, Font, Bold
	GuiControl, Font, Clock
	}
else
	{
	Gui, Font, s20 cCCCCCC
	Gui, Font, Bold
	GuiControl, Font, Clock
	}
;----------------------------------------------------------- TIME ---------------------------------------------------------------

If (Minutes != Var)
	{
	M2 += 1
	GuiControl,, SessionTime, %H%:%M1%%M2%
	Var := Minutes
	}

If (M2 > 9)
	{
	M1 += 1
	M2 = 0
	GuiControl,, SessionTime, %H%:%M1%%M2%
	}

If (M1 > 5)
	{
	H += 1
	M1 = 0
	M2 = 0
	GuiControl,, SessionTime, %H%:%M1%%M2%
	}
	
Limit = %H%:%M1%%M2%
If (Limit = SessionTimeLimit)
	{
	Gui, Font, s12 c%LimitColor%, Verdana
	GuiControl, Font, SessionTime
	}
;----------------------------------------------------------- LOOP ---------------------------------------------------------------

   Sleep %LoopInterval%

}
return
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: HOTKEYS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

^F9::				;counter (SessionTime) reset
{
H = 0
M1 = 0
M2 = 0
Gui, Font, s12 c999999, Verdana
GuiControl, Font, SessionTime
GuiControl,, SessionTime, %H%:%M1%%M2%
}
return
;................................................................................................................................

^F10::				;counter (SessionTime) + 1
Var = -1
return
;................................................................................................................................

^Q::ExitApp
;................................................................................................................................

GuiClose:
ExitApp


gl hf

I tryed to modify this^^^ my self but I get error after error because I don't have any clue what I modify. Would like to have different abi calculations for 180mans and guaranteed.


---------------
total tables current/total tables session
--------------
$2.50 180-man
current/session

$4.50 180-man
current/session

$8.00 180-man
current/session

$3.50 180-man(rebuy)
current/session

Guaranteed
current/session
------------------
180man ABI
Guaranteed ABI
Total ABI
------------
clock
session time
Table Counter AHK for PokerStars Quote
10-03-2013 , 11:27 AM
Quote:
Originally Posted by Badabadam
Would like to have different abi calculations for 180mans and guaranteed.
I'm afraid I can't help with that :/
Table Counter AHK for PokerStars Quote
10-04-2013 , 04:16 AM
Quote:
Originally Posted by Baobhan-Sith
I'm afraid I can't help with that :/


How can I add more "stakes" to my script, what I need to modify?
Now I have 4 stakes but need 1 more.
Table Counter AHK for PokerStars Quote
10-05-2013 , 05:52 AM
Quote:
Originally Posted by Badabadam


How can I add more "stakes" to my script, what I need to modify?
Now I have 4 stakes but need 1 more.
+1. Can someone please help me with adding 6 max and 9 max cap tables to the script? TIA
Table Counter AHK for PokerStars Quote
10-10-2013 , 11:13 AM
Quote:
Originally Posted by Badabadam


How can I add more "stakes" to my script, what I need to modify?
Now I have 4 stakes but need 1 more.
You can use this version; it counts 5 stakes, and it is also able to count VPP (except for GTD tourneys):
Spoiler:
Code:
#SingleInstance, force
;#NoTrayIcon
DetectHiddenWindows, On
SetTitleMatchMode, 2					;1=start 2=contain 3=exact match

;======================================================= CONFIG SECTION =========================================================

SoundBust = C:\Program Files (x86)\PokerStars\snd\bust.wav		;sound if table closes
SoundAchieve = C:\Program Files (x86)\PokerStars\snd\ding.wav	;sound if TotalLimit reached

GuiPos = x7 y590						;position of GUI on screen 
										;move the window where you want it to be, then use WindowSpy to grab its coords
										
LoopInterval = 100						;counter update interval in msec (1000 = 1sec, default = 100)

Stake1 = $3.50+R						;eg. "$3.50+R"
Stake2 = $8.00							;eg. "$8.00"
Stake3 = $15.00							;eg. "$15.00"
Stake4 = $35.00							;eg. "$35.00"
Stake5 = Gtd							;eg. "Gtd"

Stake1VPP = 1.71					
Stake2VPP = 3.63						
Stake3VPP = 6.77					
Stake4VPP = 15.79						
Stake5VPP = 0			

Color1 = 00AAFF 						;color for table counter - stake1 
Color2 = FF66FF							;color for table counter - stake2 
Color3 = 58FAAC							;color for table counter - stake3 
Color4 = ffff00 						;color for table counter - stake4 
Color5 = ff0000 						;color for table counter - stake4

CurrentLimit = 14						;desired table limit (current)
TotalLimit = 100						;desired table limit (session)
SoundInterval = 25						;SoundAchieve replays after "TotalLimit" + N tables
SessionTimeLimit = 6:00					;desired session time limit (h:mm)
MaxABI = 25								;maximum desired ABI (current & session)
MaxInvest = 2000						;maximum desired investment (session)

LimitColor = 33FF33						;color of 'SessionTime' and 'TotalTables' counters after reaching their set limits 
ClockColorBreak = FF0000				;clock color indicating sync tourney break (CCCCCC to disable this option)

RebuyMulti = 3						;stake multiplier for rebuy tourneys (ABI/Stake) 
										;!!!EDIT LINE 436!!! 


;=========================================== CONFIG HOTKEYS AT BOTTOM OF THE SCRIPT =============================================

;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

;============================================================ GUI ===============================================================

Gui -MaximizeBox -Resize +AlwaysOnTop +ToolWindow -MinimizeBox
Gui, Show, W194 H408 %GuiPos%, SessionMan 2.1	
Gui, Color, 000000		
;___________________________________________________________ TOTALS _____________________________________________________________
						
Gui, Font, s22 cCCCCCC, Verdana					
Gui, Add, Text, x-8 y1 vTotalTables Center, 00000 / 00000	
								
;Gui, Font, s18 c555555, Verdana					
;Gui, Add, Text, x7 y14 Center, ____________				
;___________________________________________________________ STAKE 1 ____________________________________________________________
									
Gui, Font, s8 c%Color1%, Verdana				
Gui, Add, Text, x27 y45 vControl1 Center, 00000000000000000000
								
Gui, Font, s16 c%Color1%, Verdana				
Gui, Add, Text, x20 y57 vStake1 Center, 00000 / 00000		
;........................................................... STAKE 2 ............................................................
								
Gui, Font, s8 c%Color2%, Verdana				
Gui, Add, Text, x27 y89 vControl2 Center, 00000000000000000000
								
Gui, Font, s16 c%Color2%, Verdana				
Gui, Add, Text, x20 y101 vStake2 Center, 00000 / 00000		
;........................................................... STAKE 3 ............................................................
								
Gui, Font, s8 c%Color3%, Verdana				
Gui, Add, Text, x27 y133 vControl3 Center, 00000000000000000000
								
Gui, Font, s16 c%Color3%, Verdana				
Gui, Add, Text, x20 y145 vStake3 Center, 00000 / 00000		
;........................................................... STAKE 4 ............................................................
								
Gui, Font, s8 c%Color4%, Verdana				
Gui, Add, Text, x27 y177 vControl4 Center, 00000000000000000000
								
Gui, Font, s16 c%Color4%, Verdana			
Gui, Add, Text, x20 y189 vStake4 Center, 00000 / 00000			
;........................................................... STAKE 5 ............................................................
								
Gui, Font, s8 c%Color5%, Verdana				
Gui, Add, Text, x27 y221 vControl5 Center, 00000000000000000000
								
Gui, Font, s16 c%Color5%, Verdana			
Gui, Add, Text, x20 y233 vStake5 Center, 00000 / 00000	
;____________________________________________________________ BUYIN _____________________________________________________________
								
;Gui, Font, s18 c555555, Verdana					
;Gui, Add, Text, x7 y240 Center, ____________			
								
Gui, Font, s14 cCCCCCC, Verdana					
Gui, Add, Text, x-6 y266 vDollars Center, $0000.00 / $0000.00	
								
Gui, Font, s11 c999999, Verdana					
Gui, Add, Text, x12 y292 vTotalABI Center, $0000.00 / $0000.00	
								
Gui, Font, s10 c999999, Verdana					
Gui, Add, Text, x67 y312 vTotalBI Center, $0000.00	

Gui, Font, s10 c555555, Verdana					
Gui, Add, Text, x58 y331 vVPP Center, 0000.00 VPP
;___________________________________________________________ CLOCK/TIME _________________________________________________________		
								
Gui, Font, s20 cCCCCCC, Verdana					
Gui, Add, Text, x41 y349 vClock Center, 000:000			
								
Gui, Font, s12 c999999, Verdana					
Gui, Font, Bold						
Gui, Add, Text, x73 y382 vSessionTime Center, 00:00		
;================================================================================================================================	

GuiControl,, Control1, %Stake1%
GuiControl,, Control2, %Stake2%
GuiControl,, Control3, %Stake3%
GuiControl,, Control4, %Stake4%
GuiControl,, Control5, %Stake5%
;--------------------------------------------------------------------------------------------------------------------------------

Buyin_Total := 0.00
Buyin_Total_TournamentCounter := 0

H = 0
M1 = 0
M2 = -1

r0 = 0
r1 = 0
r2 = 0
r3 = 0
r4 = 0
r5 = 0

t1 = 0
t2 = 0
t3 = 0
t4 = 0
t5 = 0

VPP1 = 0
VPP2 = 0
VPP3 = 0
VPP4 = 0
VPP5 = 0

P = 0

;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


Loop
{
;------------------------------------------------------------ STAKE 1 -----------------------------------------------------------
  
    v1 := 0
    c1 := 0

    WinGet, v1, count, %Stake1% ahk_class PokerStarsTableFrameClass

    Loop, %v1%
    	{	
    	c1 += 1
    	}

    if (t1 = 0)
		{
		GuiControl,, Stake1, 0 / 0
    	r1 = 0
		}

    if (t1 < c1)
		{
		t1 := c1 - 1
		}

    if (c1 > r1)
    	{
		t1++
    	GuiControl,, Stake1, %c1% / %t1%
    	r1 = %c1%
    	}

	else, if (c1 < r1)
    	{
		GuiControl,, Stake1, %c1% / %t1%
      	r1 = %c1%
    	}
;----------------------------------------------------------- STAKE 2 ------------------------------------------------------------

    v2 := 0
    c2 := 0

    WinGet, v2, count, %Stake2% ahk_class PokerStarsTableFrameClass

    Loop, %v2%
    	{	
    	c2 += 1
    	}

    if (t2 = 0)
		{
		GuiControl,, Stake2, 0 / 0
    	r2 = 0
		}

    if (t2 < c2)
		{
		t2 := c2 - 1
		}

    if (c2 > r2)
    	{
		t2++
    	GuiControl,, Stake2, %c2% / %t2%
    	r2 = %c2%
    	}

	else, if (c2 < r2)
    	{
		GuiControl,, Stake2, %c2% / %t2%
      	r2 = %c2%
    	}
;----------------------------------------------------------- STAKE 3 ------------------------------------------------------------

    v3 := 0
    c3 := 0

    WinGet, v3, count, %Stake3% ahk_class PokerStarsTableFrameClass

    Loop, %v3%
    	{	
    	c3 += 1
    	}

    if (t3 = 0)
		{
		GuiControl,, Stake3, 0 / 0
    	r3 = 0
		}

    if (t3 < c3)
		{
		t3 := c3 - 1
		}

    if (c3 > r3)
    	{
		t3++
    	GuiControl,, Stake3, %c3% / %t3%
     	r3 = %c3%
    	}

	else, if (c3 < r3)
    	{
		GuiControl,, Stake3, %c3% / %t3%
      	r3 = %c3%
    	}
;----------------------------------------------------------- STAKE 4 ------------------------------------------------------------

    v4 := 0
    c4 := 0

    WinGet, v4,count, %Stake4% ahk_class PokerStarsTableFrameClass 

    Loop, %v4%
    	{	
    	c4 += 1
    	}

    if (t4 = 0)
		{
		GuiControl,, Stake4, 0 / 0
    	r4 = 0
		}

    if (t4 < c4)
		{
		t4 := c4 - 1
		}

    if (c4 > r4)
    	{
		t4++
    	GuiControl,, Stake4, %c4% / %t4%
    	 r4 = %c4%
    	}

	else, if (c4 < r4)
    	{
		GuiControl,, Stake4, %c4% / %t4%
      	r4 = %c4%
    	}
;----------------------------------------------------------- STAKE 5 ------------------------------------------------------------

    v5 := 0
    c5 := 0

    WinGet, v5,count, %Stake5% ahk_class PokerStarsTableFrameClass

    Loop, %v5%
    	{	
    	c5 += 1
    	}

    if (t5 = 0)
		{
		GuiControl,, Stake5, 0 / 0
    	r5 = 0
		}

    if (t5 < c5)
		{
		t5 := c5 - 1
		}

    if (c5 > r5)
    	{
		t5++
    	GuiControl,, Stake5, %c5% / %t5%
    	r5 = %c5%
    	}

	else, if (c5 < r5)
    	{
		GuiControl,, Stake5, %c5% / %t5%
      	r5 = %c5%
    	}
;----------------------------------------------------------- TOTALS -------------------------------------------------------------

    c0 := c1 + c2 + c3 + c4 + c5
    t0 := t1 + t2 + t3 + t4 + t5

    GuiControl,, TotalTables, %c0% / %t0%

    if (c0 < r0)
    	{
		SoundPlay, %SoundBust%
    	}
	
    r0 = %c0%

    if (c0 < CurrentLimit)
		{
		Gui, Font, s22 cCCCCCC, Verdana
		GuiControl, Font, TotalTables
		}

	else, if (c0 >= CurrentLimit)
		{
		Gui, Font, s22 c%LimitColor%, Verdana
		GuiControl, Font, TotalTables
		}

    if (t0 = TotalLimit)
    	{
		SoundPlay, %SoundAchieve%
		TotalLimit := t0 + SoundInterval
    	}
;----------------------------------------------------------- BUYIN --------------------------------------------------------------

Buyin_Dollars:=0.00
Buyin_Dollars_TournamentCounter:=0
Buyin_Euro:=0.00
Buyin_Euro_TournamentCounter:=0
Buyin_Session:=0.00	
Buyin_Session_TournamentCounter:=0
		
Winget,Ps_Hwnd_list,List,Ahk_Class PokerStarsTableFrameClass

Loop %Ps_Hwnd_List%
{
	Hwnd:=Ps_Hwnd_List%A_index%
	IF  !(Buyin_%hwnd%)
		{
		WingetTitle,Title,Ahk_id%Hwnd%
		IF Instr(Title,"Tournament")
			{
			IF Buyin_%Hwnd%:=GetBuyin(Title,Buyin_%Hwnd%_Currency)
				{
 				BuyIn_hwnd_list:=BuyIn_hwnd_list ? BuyIn_hwnd_list "," Hwnd : Hwnd
				Buyin_Total:=Round(Buyin_Total+Buyin_%Hwnd%,2)
			    	Buyin_Total_TournamentCounter+=1
				}
			}
		}			
}	

Loop,Parse,Buyin_Hwnd_List,`,,
{
        Hwnd:=A_LoopField      
	IF WinExist("ahk_id" Hwnd)
        	{
		Currency:=Buyin_%hwnd%_Currency	
		Buyin:=Round(Buyin_%hwnd%,2)
		IF (Currency="$")
			{	
			Buyin_Dollars:=Round(Buyin_Dollars+Buyin,2)
		        Buyin_Dollars_TournamentCounter+=1
			}
		Else  IF (Currency="€")
			{		
			Buyin_Euro:=Round(Buyin_Euro+Buyin,2)
			Buyin_Euro_TournamentCounter+=1
			}		
		Buyin_Session:=Round(Buyin_Session+Buyin,2)
		Buyin_Session_TournamentCounter+=1
		}
	Else
                { 
		Temp_list:="," Buyin_Hwnd_List "," 
		StringReplace,Temp_list,Temp_list,`,Hwnd`,,,    
	        StringTrimLeft,Temp_list,Temp_list,1
		StringTrimRight,Buyin_Hwnd_List,Temp_list,1       
		}
}	
	
IF (BuyIn_Dollars_Save != BuyIn_Dollars) Or (BuyIn_Euro_Save != BuyIn_Euro) 
{
	BuyIn_Euro_Save:=BuyIn_Euro	
	BuyIn_Euro_Avg:= Round(BuyIn_Euro/BuyIn_Euro_TournamentCounter,2)		
	BuyIn_Dollars_Save:=BuyIn_Dollars
	BuyIn_Dollars_Avg:=Round(BuyIn_Dollars/BuyIn_Dollars_TournamentCounter,2)
	BuyIn_Session_Avg:=Round(BuyIn_Session/BuyIn_Session_TournamentCounter,2)
	BuyIn_Total_Avg:=Round(BuyIn_Total/BuyIn_Total_TournamentCounter,2)
		GuiControl,,Dollars,% "$" Buyin_Dollars_Avg " / $" BuyIn_Dollars
		GuiControl,,TotalABI,% "$" BuyIn_Total_Avg " / $" BuyIn_Total
		TotalBI := Round(BuyIn_Total-BuyIn_Dollars,2)
		GuiControl,,TotalBI,% "$" TotalBI "" 
}

GetBuyin(Title,byref currency="",Byref BuyinText="")
	{
	Static CurrencyList:="$,€"
 	Haystack:=Substr(Title, Instr(Title,"Sat:")+1) ;This is for satiliets
    Loop,Parse,Currencylist,`,
    	{
        IF ((StartPosBuyin := Instr(Haystack,A_loopField)) And (EndPosBuyin := Instr(Haystack,A_space,"",StartPosBuyin)))
          	{          
           	BuyinText:=Substr(Haystack,StartPosBuyin ,(EndPosBuyin - StartPosBuyin))
         	Currency=%A_loopField%
          	Buyin:=BuyinText
	  		StringReplace,Buyin,Buyin,%Currency%,, 
			IfInString, Buyin, +R
				{	
          		StringReplace,Buyin,Buyin,+R,, 
				RebuyMulti = 3
				Buyin := Buyin * RebuyMulti					
				}
             
			IF Buyin is not number
				{ 
				Buyin:=0
				currency:=
				buyinText:=    
				}
			Break     
			}
		}
	Return Buyin 
	}
		
;----------------------------------------------------------- VPP --------------------------------------------------------------

	VPP1 := t1 * Stake1VPP
	VPP2 := t2 * Stake2VPP
	VPP3 := t3 * Stake3VPP
	VPP4 := t4 * Stake4VPP
	VPP5 := t5 * Stake5VPP
	
	VPP := Round(VPP1+VPP2+VPP3+VPP4+VPP5,2)

    GuiControl,, VPP, %VPP% VPP
	
;----------------------------------------------------------- CLOCK --------------------------------------------------------------

FormatTime, Time, %A_Now%, H:mm
GuiControl,, Clock, %Time%
StringTrimLeft, TimeOnly, A_Now, 10
StringTrimRight, Minutes, TimeOnly, 2
IfGreaterOrEqual, Minutes, 55
	{
	Gui, Font, s20 c%ClockColorBreak%
	Gui, Font, Bold
	GuiControl, Font, Clock
	}
else
	{
	Gui, Font, s20 cCCCCCC
	Gui, Font, Bold
	GuiControl, Font, Clock
	}
;----------------------------------------------------------- TIME ---------------------------------------------------------------

If (Minutes != Var)
	{
	M2 += 1
	GuiControl,, SessionTime, %H%:%M1%%M2%
	Var := Minutes
	}

If (M2 > 9)
	{
	M1 += 1
	M2 = 0
	GuiControl,, SessionTime, %H%:%M1%%M2%
	}

If (M1 > 5)
	{
	H += 1
	M1 = 0
	M2 = 0
	GuiControl,, SessionTime, %H%:%M1%%M2%
	}
	
Limit = %H%:%M1%%M2%
If (Limit = SessionTimeLimit)
	{
	Gui, Font, s12 c%LimitColor%, Verdana
	GuiControl, Font, SessionTime
	}
;----------------------------------------------------------- LOOP ---------------------------------------------------------------

   Sleep %LoopInterval%

}
return
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: HOTKEYS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

^F9::				;counter (SessionTime) reset
{
H = 0
M1 = 0
M2 = 0
Gui, Font, s12 c999999, Verdana
GuiControl, Font, SessionTime
GuiControl,, SessionTime, %H%:%M1%%M2%
}
return
;................................................................................................................................

^F10::				;counter (SessionTime) + 1
Var = -1
return
;................................................................................................................................

^Q::ExitApp
;................................................................................................................................

!Pause::Pause
;................................................................................................................................

GuiClose:
ExitApp


Quote:
Originally Posted by gobby888
+1. Can someone please help me with adding 6 max and 9 max cap tables to the script? TIA
Need some examples of the exact games/stakes you play (their exact window titles, that is).
Table Counter AHK for PokerStars Quote
10-11-2013 , 12:09 AM
Quote:
Originally Posted by Baobhan-Sith
there you go (for 9man Turbo SNG):
Code:
#SingleInstance, force
;#NoTrayIcon
DetectHiddenWindows, On
SetTitleMatchMode, 2					;1=start 2=contain 3=exact match

;======================================================= CONFIG SECTION =========================================================

SoundBust = C:\Program Files (x86)\PokerStars\snd\bust.wav		;sound if table closes
SoundAchieve = C:\Program Files (x86)\PokerStars\snd\ding.wav	;sound if TotalLimit reached

GuiPos = x1000 y5						;position of GUI on screen 
										;move the window where you want it to be, then use WindowSpy to grab its coords
										
LoopInterval = 100						;counter update interval in msec (1000 = 1sec, default = 100)

Stake1 = $15.00 							;eg. "$15.00"
Stake2 = $30.00							;eg. "$30.00"
Stake3 = $60.00							;eg. "$60.00"
Stake4 = $100.00							;eg. "$100.00"
						
						

Players1 = [Turbo]
Players2 = [Turbo]
Players3 = [Turbo]
Players4 = [Turbo]



Color1 = ffff00	 						;color for table counter - stake1 
Color2 = ffff00								;color for table counter - stake2 
Color3 = ffff00							;color for table counter - stake3 
Color4 = ffff00 						;color for table counter - stake4 



CurrentLimit = 400						;desired table limit (current)
TotalLimit = 3000						;desired table limit (session)
SoundInterval = 25						;SoundAchieve replays after "TotalLimit" + N tables
SessionTimeLimit = 60:00					;desired session time limit (h:mm)
MaxABI = 20000								;maximum desired ABI (current & session)
MaxInvest = 100000						;maximum desired investment (session)

LimitColor = 33FF33						;color of 'SessionTime' and 'TotalTables' counters after reaching their set limits 
ClockColorBreak = FF0000				;clock color indicating sync tourney break (CCCCCC to disable this option)

RebuyMulti = 3							;stake multiplier for rebuy tourneys (ABI/Stake) 
										;!!!EDIT LINE 436!!! 
										
;=========================================== CONFIG HOTKEYS AT BOTTOM OF THE SCRIPT =============================================

;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

;============================================================ GUI ===============================================================

Gui -MaximizeBox -Resize +AlwaysOnTop +ToolWindow -MinimizeBox
Gui, Show, W194 H408 %GuiPos%, SessionMan 2.2	
Gui, Color, 000000		
;___________________________________________________________ TOTALS _____________________________________________________________
						
Gui, Font, s22 cCCCCCC, Verdana					
Gui, Add, Text, x-8 y1 vTotalTables Center, 00000 / 00000	
								
Gui, Font, s18 c555555, Verdana					
Gui, Add, Text, x7 y14 Center, ____________				
;___________________________________________________________ STAKE 1 ____________________________________________________________
									
Gui, Font, s8 c%Color1%, Verdana				
Gui, Add, Text, x27 y45 vControl1 Center, 00000000000000000000
								
Gui, Font, s16 c%Color1%, Verdana				
Gui, Add, Text, x20 y57 vStake1 Center, 00000 / 00000		
;........................................................... STAKE 2 ............................................................
								
Gui, Font, s8 c%Color2%, Verdana				
Gui, Add, Text, x27 y89 vControl2 Center, 00000000000000000000
								
Gui, Font, s16 c%Color2%, Verdana				
Gui, Add, Text, x20 y101 vStake2 Center, 00000 / 00000		
;........................................................... STAKE 3 ............................................................
								
Gui, Font, s8 c%Color3%, Verdana				
Gui, Add, Text, x27 y133 vControl3 Center, 00000000000000000000
								
Gui, Font, s16 c%Color3%, Verdana				
Gui, Add, Text, x20 y145 vStake3 Center, 00000 / 00000		
;........................................................... STAKE 4 ............................................................
								
Gui, Font, s8 c%Color4%, Verdana				
Gui, Add, Text, x27 y177 vControl4 Center, 00000000000000000000
								
Gui, Font, s16 c%Color4%, Verdana			
Gui, Add, Text, x20 y189 vStake4 Center, 00000 / 00000			
;........................................................... STAKE 5 ............................................................
								
Gui, Font, s8 c%Color5%, Verdana				
Gui, Add, Text, x27 y221 vControl5 Center, 00000000000000000000
								
Gui, Font, s16 c%Color5%, Verdana			
Gui, Add, Text, x20 y233 vStake5 Center, 00000 / 00000			
;........................................................... STAKE 6 ............................................................
								
Gui, Font, s8 c%Color6%, Verdana				
Gui, Add, Text, x27 y265 vControl6 Center, 00000000000000000000
								
Gui, Font, s16 c%Color6%, Verdana			
Gui, Add, Text, x20 y277 vStake6 Center, 00000 / 00000	
;____________________________________________________________ BUYIN _____________________________________________________________
						
Gui, Font, s18 c555555, Verdana							
Gui, Add, Text, x7 y285 Center, ____________	

Gui, Font, s11 c999999, Verdana					
Gui, Add, Text, x12 y318 vTotalABI Center, $0000.00 / $0000.00	
;___________________________________________________________ CLOCK/TIME _________________________________________________________		
								
Gui, Font, s18 c555555, Verdana							
Gui, Add, Text, x7 y318 Center, ____________

Gui, Font, s20 cCCCCCC, Verdana					
Gui, Add, Text, x41 y349 vClock Center, 000:000			
								
Gui, Font, s12 c999999, Verdana					
Gui, Font, Bold						
Gui, Add, Text, x73 y382 vSessionTime Center, 00:00		
;================================================================================================================================	

GuiControl,, Control1, %Stake1% - 9 Players
GuiControl,, Control2, %Stake2% - 9 Players
GuiControl,, Control3, %Stake3% - 9 Players
GuiControl,, Control4, %Stake4% - 9 Players

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

Buyin_Total := 0.00
Buyin_Total_TournamentCounter := 0

H = 0
M1 = 0
M2 = -1

r0 = 0
r1 = 0
r2 = 0
r3 = 0
r4 = 0
r5 = 0
r6 = 0

t1 = 0
t2 = 0
t3 = 0
t4 = 0
t5 = 0
t6 = 0

P = 0



;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


Loop
{
;------------------------------------------------------------ STAKE 1 -----------------------------------------------------------
  
    v1 := 0
    c1 := 0

    WinGet, v1, count, %Stake1% NL Hold'em %Players1% ahk_class PokerStarsTableFrameClass

    Loop, %v1%
    	{	
    	c1 += 1
    	}

    if (t1 = 0)
		{
		GuiControl,, Stake1, 0 / 0
    	r1 = 0
		}

    if (t1 < c1)
		{
		t1 := c1 - 1
		}

    if (c1 > r1)
    	{
		t1++
    	GuiControl,, Stake1, %c1% / %t1%
    	r1 = %c1%
    	}

	else, if (c1 < r1)
    	{
		GuiControl,, Stake1, %c1% / %t1%
      	r1 = %c1%
    	}
;----------------------------------------------------------- STAKE 2 ------------------------------------------------------------

    v2 := 0
    c2 := 0

    WinGet, v2, count, %Stake2% NL Hold'em %Players2% ahk_class PokerStarsTableFrameClass

    Loop, %v2%
    	{	
    	c2 += 1
    	}

    if (t2 = 0)
		{
		GuiControl,, Stake2, 0 / 0
    	r2 = 0
		}

    if (t2 < c2)
		{
		t2 := c2 - 1
		}

    if (c2 > r2)
    	{
		t2++
    	GuiControl,, Stake2, %c2% / %t2%
    	r2 = %c2%
    	}

	else, if (c2 < r2)
    	{
		GuiControl,, Stake2, %c2% / %t2%
      	r2 = %c2%
    	}
;----------------------------------------------------------- STAKE 3 ------------------------------------------------------------

    v3 := 0
    c3 := 0

    WinGet, v3, count, %Stake3% NL Hold'em %Players3% ahk_class PokerStarsTableFrameClass

    Loop, %v3%
    	{	
    	c3 += 1
    	}

    if (t3 = 0)
		{
		GuiControl,, Stake3, 0 / 0
    	r3 = 0
		}

    if (t3 < c3)
		{
		t3 := c3 - 1
		}

    if (c3 > r3)
    	{
		t3++
    	GuiControl,, Stake3, %c3% / %t3%
     	r3 = %c3%
    	}

	else, if (c3 < r3)
    	{
		GuiControl,, Stake3, %c3% / %t3%
      	r3 = %c3%
    	}
;----------------------------------------------------------- STAKE 4 ------------------------------------------------------------

    v4 := 0
    c4 := 0

    WinGet, v4,count, %Stake4% NL Hold'em %Players4% ahk_class PokerStarsTableFrameClass 

    Loop, %v4%
    	{	
    	c4 += 1
    	}

    if (t4 = 0)
		{
		GuiControl,, Stake4, 0 / 0
    	r4 = 0
		}

    if (t4 < c4)
		{
		t4 := c4 - 1
		}

    if (c4 > r4)
    	{
		t4++
    	GuiControl,, Stake4, %c4% / %t4%
    	 r4 = %c4%
    	}

	else, if (c4 < r4)
    	{
		GuiControl,, Stake4, %c4% / %t4%
      	r4 = %c4%
    	}
;----------------------------------------------------------- STAKE 5 ------------------------------------------------------------

    v5 := 0
    c5 := 0

    WinGet, v5,count, %Stake5% NL Hold'em %Players5% ahk_class PokerStarsTableFrameClass

    Loop, %v5%
    	{	
    	c5 += 1
    	}

    if (t5 = 0)
		{
		GuiControl,, Stake5, 0 / 0
    	r5 = 0
		}

    if (t5 < c5)
		{
		t5 := c5 - 1
		}

    if (c5 > r5)
    	{
		t5++
    	GuiControl,, Stake5, %c5% / %t5%
    	r5 = %c5%
    	}

	else, if (c5 < r5)
    	{
		GuiControl,, Stake5, %c5% / %t5%
      	r5 = %c5%
    	}
;----------------------------------------------------------- STAKE 6 ------------------------------------------------------------

    v6 := 0
    c6 := 0

    WinGet, v6,count, %Stake6% ahk_class PokerStarsTableFrameClass

    Loop, %v6%
    	{	
    	c6 += 1
    	}

    if (t6 = 0)
		{
		GuiControl,, Stake6, 0 / 0
    	r6 = 0
		}

    if (t6 < c6)
		{
		t6 := c6 - 1
		}

    if (c6 > r6)
    	{
		t6++
    	GuiControl,, Stake6, %c6% / %t6%
    	r6 = %c6%
    	}

	else, if (c6 < r6)
    	{
		GuiControl,, Stake6, %c6% / %t6%
      	r6 = %c6%
    	}
;----------------------------------------------------------- TOTALS -------------------------------------------------------------

    c0 := c1 + c2 + c3 + c4 
    t0 := t1 + t2 + t3 + t4 

    GuiControl,, TotalTables, %c0% / %t0%

    if (c0 < r0)
    	{
		SoundPlay, %SoundBust%
    	}
	
    r0 = %c0%

    if (c0 < CurrentLimit)
		{
		Gui, Font, s22 cCCCCCC, Verdana
		GuiControl, Font, TotalTables
		}

	else, if (c0 >= CurrentLimit)
		{
		Gui, Font, s22 c%LimitColor%, Verdana
		GuiControl, Font, TotalTables
		}

    if (t0 = TotalLimit)
    	{
		SoundPlay, %SoundAchieve%
		TotalLimit := t0 + SoundInterval
    	}
;----------------------------------------------------------- BUYIN --------------------------------------------------------------

Buyin_Dollars:=0.00
Buyin_Dollars_TournamentCounter:=0
Buyin_Euro:=0.00
Buyin_Euro_TournamentCounter:=0
Buyin_Session:=0.00	
Buyin_Session_TournamentCounter:=0
		
Winget,Ps_Hwnd_list,List,Ahk_Class PokerStarsTableFrameClass

Loop %Ps_Hwnd_List%
{
	Hwnd:=Ps_Hwnd_List%A_index%
	IF  !(Buyin_%hwnd%)
		{
		WingetTitle,Title,Ahk_id%Hwnd%
		IF Instr(Title,"Tournament")
			{
			IF Buyin_%Hwnd%:=GetBuyin(Title,Buyin_%Hwnd%_Currency)
				{
 				BuyIn_hwnd_list:=BuyIn_hwnd_list ? BuyIn_hwnd_list "," Hwnd : Hwnd
				Buyin_Total:=Round(Buyin_Total+Buyin_%Hwnd%,2)
			    	Buyin_Total_TournamentCounter+=1
				}
			}
		}			
}	

Loop,Parse,Buyin_Hwnd_List,`,,
{
        Hwnd:=A_LoopField      
	IF WinExist("ahk_id" Hwnd)
        	{
		Currency:=Buyin_%hwnd%_Currency	
		Buyin:=Round(Buyin_%hwnd%,2)
		IF (Currency="$")
			{	
			Buyin_Dollars:=Round(Buyin_Dollars+Buyin,2)
		        Buyin_Dollars_TournamentCounter+=1
			}
		Else  IF (Currency="€")
			{		
			Buyin_Euro:=Round(Buyin_Euro+Buyin,2)
			Buyin_Euro_TournamentCounter+=1
			}		
		Buyin_Session:=Round(Buyin_Session+Buyin,2)
		Buyin_Session_TournamentCounter+=1
		}
	Else
                { 
		Temp_list:="," Buyin_Hwnd_List "," 
		StringReplace,Temp_list,Temp_list,`,Hwnd`,,,    
	        StringTrimLeft,Temp_list,Temp_list,1
		StringTrimRight,Buyin_Hwnd_List,Temp_list,1       
		}
}	
	
IF (BuyIn_Dollars_Save != BuyIn_Dollars) Or (BuyIn_Euro_Save != BuyIn_Euro) 
{
	BuyIn_Euro_Save:=BuyIn_Euro	
	BuyIn_Euro_Avg:= Round(BuyIn_Euro/BuyIn_Euro_TournamentCounter,2)		
	BuyIn_Dollars_Save:=BuyIn_Dollars
	BuyIn_Dollars_Avg:=Round(BuyIn_Dollars/BuyIn_Dollars_TournamentCounter,2)
	BuyIn_Session_Avg:=Round(BuyIn_Session/BuyIn_Session_TournamentCounter,2)
	BuyIn_Total_Avg:=Round(BuyIn_Total/BuyIn_Total_TournamentCounter,2)
		GuiControl,,Dollars,% "$" Buyin_Dollars_Avg " / $" BuyIn_Dollars
		GuiControl,,TotalABI,% "$" BuyIn_Total_Avg " / $" BuyIn_Total
		TotalBI := Round(BuyIn_Total-BuyIn_Dollars,2)
		GuiControl,,TotalBI,% "$" TotalBI "" 
}

GetBuyin(Title,byref currency="",Byref BuyinText="")
	{
	Static CurrencyList:="$,€"
 	Haystack:=Substr(Title, Instr(Title,"Sat:")+1) ;This is for satiliets
    Loop,Parse,Currencylist,`,
    	{
        IF ((StartPosBuyin := Instr(Haystack,A_loopField)) And (EndPosBuyin := Instr(Haystack,A_space,"",StartPosBuyin)))
          	{          
           	BuyinText:=Substr(Haystack,StartPosBuyin ,(EndPosBuyin - StartPosBuyin))
         	Currency=%A_loopField%
          	Buyin:=BuyinText
	  		StringReplace,Buyin,Buyin,%Currency%,, 
			IfInString, Buyin, +R
				{	
          		StringReplace,Buyin,Buyin,+R,, 
				RebuyMulti = 3
				Buyin := Buyin * RebuyMulti					
				}
             
			IF Buyin is not number
				{ 
				Buyin:=0
				currency:=
				buyinText:=    
				}
			Break     
			}
		}
	Return Buyin 
	}
	
;----------------------------------------------------------- CLOCK --------------------------------------------------------------

FormatTime, Time, %A_Now%, H:mm
GuiControl,, Clock, %Time%
StringTrimLeft, TimeOnly, A_Now, 10
StringTrimRight, Minutes, TimeOnly, 2
IfGreaterOrEqual, Minutes, 55
	{
	Gui, Font, s20 c%ClockColorBreak%
	Gui, Font, Bold
	GuiControl, Font, Clock
	}
else
	{
	Gui, Font, s20 cCCCCCC
	Gui, Font, Bold
	GuiControl, Font, Clock
	}
;----------------------------------------------------------- TIME ---------------------------------------------------------------

If (Minutes != Var)
	{
	M2 += 1
	GuiControl,, SessionTime, %H%:%M1%%M2%
	Var := Minutes
	}

If (M2 > 9)
	{
	M1 += 1
	M2 = 0
	GuiControl,, SessionTime, %H%:%M1%%M2%
	}

If (M1 > 5)
	{
	H += 1
	M1 = 0
	M2 = 0
	GuiControl,, SessionTime, %H%:%M1%%M2%
	}
	
Limit = %H%:%M1%%M2%
If (Limit = SessionTimeLimit)
	{
	Gui, Font, s12 c%LimitColor%, Verdana
	GuiControl, Font, SessionTime
	}
;----------------------------------------------------------- LOOP ---------------------------------------------------------------

   Sleep %LoopInterval%

}
return
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: HOTKEYS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

^F9::				;counter (SessionTime) reset
{
H = 0
M1 = 0
M2 = 0
Gui, Font, s12 c999999, Verdana
GuiControl, Font, SessionTime
GuiControl,, SessionTime, %H%:%M1%%M2%
}
return
;................................................................................................................................

^F10::				;counter (SessionTime) + 1
Var = -1
return
;................................................................................................................................

^Q::ExitApp
;................................................................................................................................

!Pause::Pause
;................................................................................................................................

GuiClose:
ExitApp

Hi, really appreciate for your work. Im really noob on this but im love using your ahk.
I would like to know if you can make some changes on this one, please?
Adding regular speed on every stackes, taking out the $100, and also adding turbo and non turbo 15$ and 30$ 6 max?

Again, thanks for this and for your contribution, amazing job!
Table Counter AHK for PokerStars Quote
10-11-2013 , 05:49 AM
Quote:
Originally Posted by Baobhan-Sith
Need some examples of the exact games/stakes you play (their exact window titles, that is).
Hi,

Examples are:

Palisana CAP - $0.50/$1 - $20 Cap - USD - No Limit Hold'em

Nissen CAP - $1/2 - $40 Cap - USD - No Limit Hold'em

Eleonora II CAP - $2/4 - $80 Cap - USD - No Limit Hold'em

Pilcher II CAP - $3/6 - $120 Cap - USD - No Limit Hold'em

Turais IV CAP - $5/10 - $200 Cap - USD - No Limit Hold'em

5 different stake levels (6 max and 9max aren't defined in the title bar)

Cheers

Last edited by gobby888; 10-11-2013 at 06:03 AM. Reason: added extra
Table Counter AHK for PokerStars Quote
10-11-2013 , 07:14 PM
Bear with me guys, I'm quite busy atm. Will look into it asap but that's prolly not before Monday.
Table Counter AHK for PokerStars Quote
10-15-2013 , 10:25 AM
Quote:
Originally Posted by Baobhan-Sith
Bear with me guys, I'm quite busy atm. Will look into it asap but that's prolly not before Monday.

Thanks! will be waiting.
Table Counter AHK for PokerStars Quote
10-26-2013 , 02:59 PM
I just want to thanks to the guy who devoloped this script. It has been amazing. Thanks!
Table Counter AHK for PokerStars Quote
11-01-2013 , 11:00 AM
Bro, can i send you 10$ for you to change a bit the script?? cheers
Table Counter AHK for PokerStars Quote
11-01-2013 , 10:28 PM
Ugh sry guys, on top of being busy I also got sick, hence the delay. Please PM me what games you want to play and I'll look into it asap.
Table Counter AHK for PokerStars Quote
11-06-2013 , 10:44 AM
Quote:
Originally Posted by gobby888
Hi,

If you could do the following cash games for me, that would be great, thanks.

Palisana CAP - $0.50/$1 - $20 Cap - USD - No Limit Hold'em

Nissen CAP - $1/2 - $40 Cap - USD - No Limit Hold'em

Eleonora II CAP - $2/4 - $80 Cap - USD - No Limit Hold'em

Pilcher II CAP - $3/6 - $120 Cap - USD - No Limit Hold'em

Turais IV CAP - $5/10 - $200 Cap - USD - No Limit Hold'em

5 different stake levels (6 max and 9max aren't defined in the title bar)

Cheers,
gobby


I assume this should do it. Note that you can define stakes as either of the following:

$10/$20 - $400 Cap
$400 Cap
CAP - $10/$20
$10/$20 (will count all $10/$20 tables regardless of entrants/Cap)
$10/$20 USD (will count only regular $10/$20 games, including ZOOM, but regardless of entrants)
€5/€10 EUR (will count only regular €5/€10 games but regardless of entrants)

It is not possible to distinguish between 6max and 9max (nor between regular and ZOOM*) cashgame tables.

* Unless you include the ZOOM table name in the stake definition, that is.

This version comes with hotkeys (F1-F12) to move tables to different slots.

Spoiler:
Code:
#SingleInstance, force
#NoTrayIcon
DetectHiddenWindows, On
SetTitleMatchMode, 2					;1=start 2=contain 3=exact match

;======================================================= CONFIG SECTION =========================================================

SoundBust = C:\Program Files (x86)\PokerStars\snd\bust.wav		;sound if table closes
SoundAchieve = C:\Program Files (x86)\PokerStars\snd\ding.wav	;sound if TotalLimit reached

GuiPos = x7 y590						;position of GUI on screen 
										;move the window where you want it to be, then use WindowSpy to grab its coords
										
LoopInterval = 100						;counter update interval in msec (1000 = 1sec, default = 100)

Stake1 = $20 Cap						;eg. "$0.50/$1 - $20 Cap"
Stake2 = $40 Cap						;eg. "$1/$2"
Stake3 = $80 Cap						;eg. "$80 Cap"
Stake4 = $120 Cap						;eg. "$120 Cap"
Stake5 = $200 Cap						;eg. "$5/$10 - $200 Cap"		

Color1 = FFFF00 						;color for table counter - stake1 
Color2 = FE642E							;color for table counter - stake2 
Color3 = FE2EC8							;color for table counter - stake3 
Color4 = 0040FF 						;color for table counter - stake4 
Color5 = 01DF01 						;color for table counter - stake4

CurrentLimit = 14						;desired table limit (current)
TotalLimit = 100						;desired table limit (session)
SoundInterval = 25						;SoundAchieve replays after "TotalLimit" + N tables
SessionTimeLimit = 6:00					;desired session time limit (h:mm)

LimitColor = 33FF33						;color of 'SessionTime' and 'TotalTables' counters after reaching their set limits 
ClockColorBreak = FF0000				;clock color indicating sync tourney break (CCCCCC to disable this option)

;----------------------------------------------------------
SlotA1x := 304							;F1
SlotA1y := 0

SlotA2x := 1112							;F2
SlotA2y := 0

SlotA3x := 1920							;F3
SlotA3y := 0

SlotA4x := 2728							;F4
SlotA4y := 0
;----------------------------------------------------------
SlotB1x := 304							;F5
SlotB1y := 299

SlotB2x := 1112							;F6
SlotB2y := 299

SlotB3x := 1920							;F7
SlotB3y := 299

SlotB4x := 2728							;F8
SlotB4y := 299
;----------------------------------------------------------
SlotC1x := 304							;F9
SlotC1y := 584

SlotC2x := 1112							;F10
SlotC2y := 584

SlotC3x := 1920							;F11
SlotC3y := 584

SlotC4x := 2728							;F12
SlotC4y := 584
;----------------------------------------------------------
;=========================================== CONFIG HOTKEYS AT BOTTOM OF THE SCRIPT =============================================

;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

;============================================================ GUI ===============================================================

Gui -MaximizeBox -Resize +AlwaysOnTop +ToolWindow -MinimizeBox
Gui, Show, W194 H324 %GuiPos%, SessionMan 2.2.05	
Gui, Color, 000000		
;___________________________________________________________ TOTALS _____________________________________________________________
						
Gui, Font, s22 cCCCCCC, Verdana					
Gui, Add, Text, x-8 y1 vTotalTables Center, 00000 / 00000	
								
;Gui, Font, s18 c555555, Verdana					
;Gui, Add, Text, x7 y14 Center, ____________				
;___________________________________________________________ STAKE 1 ____________________________________________________________
									
Gui, Font, s8 c%Color1%, Verdana				
Gui, Add, Text, x27 y45 vControl1 Center, 00000000000000000000
								
Gui, Font, s16 c%Color1%, Verdana				
Gui, Add, Text, x20 y57 vStake1 Center, 00000 / 00000		
;........................................................... STAKE 2 ............................................................
								
Gui, Font, s8 c%Color2%, Verdana				
Gui, Add, Text, x27 y89 vControl2 Center, 00000000000000000000
								
Gui, Font, s16 c%Color2%, Verdana				
Gui, Add, Text, x20 y101 vStake2 Center, 00000 / 00000		
;........................................................... STAKE 3 ............................................................
								
Gui, Font, s8 c%Color3%, Verdana				
Gui, Add, Text, x27 y133 vControl3 Center, 00000000000000000000
								
Gui, Font, s16 c%Color3%, Verdana				
Gui, Add, Text, x20 y145 vStake3 Center, 00000 / 00000		
;........................................................... STAKE 4 ............................................................
								
Gui, Font, s8 c%Color4%, Verdana				
Gui, Add, Text, x27 y177 vControl4 Center, 00000000000000000000
								
Gui, Font, s16 c%Color4%, Verdana			
Gui, Add, Text, x20 y189 vStake4 Center, 00000 / 00000			
;........................................................... STAKE 5 ............................................................
								
Gui, Font, s8 c%Color5%, Verdana				
Gui, Add, Text, x27 y221 vControl5 Center, 00000000000000000000
								
Gui, Font, s16 c%Color5%, Verdana			
Gui, Add, Text, x20 y233 vStake5 Center, 00000 / 00000	
;___________________________________________________________ CLOCK/TIME _________________________________________________________		
								
Gui, Font, s20 cCCCCCC, Verdana					
Gui, Add, Text, x41 y266 vClock Center, 000:000			
								
Gui, Font, s12 c999999, Verdana					
Gui, Font, Bold						
Gui, Add, Text, x73 y300 vSessionTime Center, 00:00		
;================================================================================================================================	

GuiControl,, Control1, %Stake1%
GuiControl,, Control2, %Stake2%
GuiControl,, Control3, %Stake3%
GuiControl,, Control4, %Stake4%
GuiControl,, Control5, %Stake5%
;--------------------------------------------------------------------------------------------------------------------------------

Buyin_Total := 0.00
Buyin_Total_TournamentCounter := 0

H = 0
M1 = 0
M2 = -1

r0 = 0
r1 = 0
r2 = 0
r3 = 0
r4 = 0
r5 = 0

t1 = 0
t2 = 0
t3 = 0
t4 = 0
t5 = 0

P = 0

;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


Loop
{
;------------------------------------------------------------ STAKE 1 -----------------------------------------------------------
  
    v1 := 0
    c1 := 0

    WinGet, v1, count, %Stake1% ahk_class PokerStarsTableFrameClass

    Loop, %v1%
    	{	
    	c1 += 1
    	}

    if (t1 = 0)
		{
		GuiControl,, Stake1, 0 / 0
    	r1 = 0
		}

    if (t1 < c1)
		{
		t1 := c1 - 1
		}

    if (c1 > r1)
    	{
		t1++
    	GuiControl,, Stake1, %c1% / %t1%
    	r1 = %c1%
    	}

	else, if (c1 < r1)
    	{
		GuiControl,, Stake1, %c1% / %t1%
      	r1 = %c1%
    	}
;----------------------------------------------------------- STAKE 2 ------------------------------------------------------------

    v2 := 0
    c2 := 0

    WinGet, v2, count, %Stake2% ahk_class PokerStarsTableFrameClass

    Loop, %v2%
    	{	
    	c2 += 1
    	}

    if (t2 = 0)
		{
		GuiControl,, Stake2, 0 / 0
    	r2 = 0
		}

    if (t2 < c2)
		{
		t2 := c2 - 1
		}

    if (c2 > r2)
    	{
		t2++
    	GuiControl,, Stake2, %c2% / %t2%
    	r2 = %c2%
    	}

	else, if (c2 < r2)
    	{
		GuiControl,, Stake2, %c2% / %t2%
      	r2 = %c2%
    	}
;----------------------------------------------------------- STAKE 3 ------------------------------------------------------------

    v3 := 0
    c3 := 0

    WinGet, v3, count, %Stake3% ahk_class PokerStarsTableFrameClass

    Loop, %v3%
    	{	
    	c3 += 1
    	}

    if (t3 = 0)
		{
		GuiControl,, Stake3, 0 / 0
    	r3 = 0
		}

    if (t3 < c3)
		{
		t3 := c3 - 1
		}

    if (c3 > r3)
    	{
		t3++
    	GuiControl,, Stake3, %c3% / %t3%
     	r3 = %c3%
    	}

	else, if (c3 < r3)
    	{
		GuiControl,, Stake3, %c3% / %t3%
      	r3 = %c3%
    	}
;----------------------------------------------------------- STAKE 4 ------------------------------------------------------------

    v4 := 0
    c4 := 0

    WinGet, v4,count, %Stake4% ahk_class PokerStarsTableFrameClass 

    Loop, %v4%
    	{	
    	c4 += 1
    	}

    if (t4 = 0)
		{
		GuiControl,, Stake4, 0 / 0
    	r4 = 0
		}

    if (t4 < c4)
		{
		t4 := c4 - 1
		}

    if (c4 > r4)
    	{
		t4++
    	GuiControl,, Stake4, %c4% / %t4%
    	 r4 = %c4%
    	}

	else, if (c4 < r4)
    	{
		GuiControl,, Stake4, %c4% / %t4%
      	r4 = %c4%
    	}
;----------------------------------------------------------- STAKE 5 ------------------------------------------------------------

    v5 := 0
    c5 := 0

    WinGet, v5,count, %Stake5% ahk_class PokerStarsTableFrameClass

    Loop, %v5%
    	{	
    	c5 += 1
    	}

    if (t5 = 0)
		{
		GuiControl,, Stake5, 0 / 0
    	r5 = 0
		}

    if (t5 < c5)
		{
		t5 := c5 - 1
		}

    if (c5 > r5)
    	{
		t5++
    	GuiControl,, Stake5, %c5% / %t5%
    	r5 = %c5%
    	}

	else, if (c5 < r5)
    	{
		GuiControl,, Stake5, %c5% / %t5%
      	r5 = %c5%
    	}
;----------------------------------------------------------- TOTALS -------------------------------------------------------------

    c0 := c1 + c2 + c3 + c4 + c5
    t0 := t1 + t2 + t3 + t4 + t5

    GuiControl,, TotalTables, %c0% / %t0%

    if (c0 < r0)
    	{
		SoundPlay, %SoundBust%
    	}
	
    r0 = %c0%

    if (c0 < CurrentLimit)
		{
		Gui, Font, s22 cCCCCCC, Verdana
		GuiControl, Font, TotalTables
		}

	else, if (c0 >= CurrentLimit)
		{
		Gui, Font, s22 c%LimitColor%, Verdana
		GuiControl, Font, TotalTables
		}

    if (t0 = TotalLimit)
    	{
		SoundPlay, %SoundAchieve%
		TotalLimit := t0 + SoundInterval
		}
;----------------------------------------------------------- CLOCK --------------------------------------------------------------

FormatTime, Time, %A_Now%, H:mm
GuiControl,, Clock, %Time%
StringTrimLeft, TimeOnly, A_Now, 10
StringTrimRight, Minutes, TimeOnly, 2
IfGreaterOrEqual, Minutes, 55
	{
	Gui, Font, s20 c%ClockColorBreak%
	Gui, Font, Bold
	GuiControl, Font, Clock
	}
else
	{
	Gui, Font, s20 cCCCCCC
	Gui, Font, Bold
	GuiControl, Font, Clock
	}
;----------------------------------------------------------- TIME ---------------------------------------------------------------

If (Minutes != Var)
	{
	M2 += 1
	GuiControl,, SessionTime, %H%:%M1%%M2%
	Var := Minutes
	}

If (M2 > 9)
	{
	M1 += 1
	M2 = 0
	GuiControl,, SessionTime, %H%:%M1%%M2%
	}

If (M1 > 5)
	{
	H += 1
	M1 = 0
	M2 = 0
	GuiControl,, SessionTime, %H%:%M1%%M2%
	}
	
Limit = %H%:%M1%%M2%
If (Limit = SessionTimeLimit)
	{
	Gui, Font, s12 c%LimitColor%, Verdana
	GuiControl, Font, SessionTime
	}
;----------------------------------------------------------- LOOP ---------------------------------------------------------------

   Sleep %LoopInterval%

}
return
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: HOTKEYS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

^F9::				;counter (SessionTime) reset
{
H = 0
M1 = 0
M2 = 0
Gui, Font, s12 c999999, Verdana
GuiControl, Font, SessionTime
GuiControl,, SessionTime, %H%:%M1%%M2%
}
return
;................................................................................................................................

^F10::				;counter (SessionTime) + 1
Var = -1
return
;................................................................................................................................

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TABLE MOVEMENTS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

F1::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotA1x%, %SlotA1y%
else, return
}
return
;................................................................................................................................

F2::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotA2x%, %SlotA2y%
else, return
}
return

;................................................................................................................................

F3::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotA3x%, %SlotA3y%
else, return
}
return
;................................................................................................................................

F4::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotA4x%, %SlotA4y%
else, return
}
return
;................................................................................................................................

^F3::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotA0x%, %SlotA0y%
else, return
}
return
;................................................................................................................................

F5::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotB1x%, %SlotB1y%
else, return
}
return
;................................................................................................................................

F6::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotB2x%, %SlotB2y%
else, return
}
return
;................................................................................................................................

F7::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotB3x%, %SlotB3y%
else, return
}
return
;................................................................................................................................

F8::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotB4x%, %SlotB4y%
else, return
}
return
;................................................................................................................................

F9::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotC1x%, %SlotC1y%
else, return
}
return
;................................................................................................................................

F10::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotC2x%, %SlotC2y%
else, return
}
return
;................................................................................................................................

F11::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotC3x%, %SlotC3y%
else, return
}
return
;................................................................................................................................

F12::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotC4x%, %SlotC4y%
else, return
}
return
;................................................................................................................................
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; AUTO REG ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

^F5::
{
WinActivate, PokerStars Lobby
WinWaitActive, PokerStars Lobby
WinActivate, PokerStars Lobby
IfWinActive, PokerStars Lobby
	{
	MouseClick, left, 450, 300				;mark 1st tournament
	MouseClick, left, 600, 460				;register button
	Sleep, 1300
	WinActivate, ahk_class #32770
	MouseMove, 0, -416
	WinActivate, ahk_class PokerStarsTableFrameClass
	}
else, return
}
return
;................................................................................................................................

^F6::
{
WinActivate, PokerStars Lobby
WinWaitActive, ahk_class ahk_class #32770
WinActivate, PokerStars Lobby
IfWinActive, ahk_class #32770
	{
	MouseClick, left, 450, 315				;mark 2nd tournament
	MouseClick, left, 600, 460				;register button
	Sleep, 1300
	WinActivate, ahk_class #32770
	MouseMove, 0, -416
	WinActivate, ahk_class PokerStarsTableFrameClass
	}
else, return
}
return
;................................................................................................................................

^F7::
{
WinActivate, PokerStars Lobby
WinWaitActive, ahk_class ahk_class #32770
WinActivate, PokerStars Lobby
IfWinActive, ahk_class #32770
	{
	MouseClick, left, 450, 330				;mark 3rd tournament
	MouseClick, left, 600, 460				;register button
	Sleep, 1300
	WinActivate, ahk_class #32770
	MouseMove, 0, -416
	WinActivate, ahk_class PokerStarsTableFrameClass
	}
else, return
}
return
;................................................................................................................................

^F8::
{
WinActivate, PokerStars Lobby
WinWaitActive, ahk_class ahk_class #32770
WinActivate, PokerStars Lobby
IfWinActive, ahk_class #32770
	{
	MouseClick, left, 450, 345				;mark 4th tournament
	MouseClick, left, 600, 460				;register button
	Sleep, 1300
	WinActivate, ahk_class #32770
	MouseMove, 0, -416
	WinActivate, ahk_class PokerStarsTableFrameClass
	}
else, return
}
return
;................................................................................................................................

^Q::ExitApp
;................................................................................................................................

!Pause::Pause
;................................................................................................................................

GuiClose:
ExitApp


This one was easy; now working on lowskill's version which will be a bit more complicated.

Last edited by Baobhan-Sith; 11-06-2013 at 11:11 AM.
Table Counter AHK for PokerStars Quote
11-06-2013 , 05:32 PM
OK lowskill, took me a while to find a reliable way to distinguish between regspeed and turbo but finally did it. What a PITA they randomly choose the number of blanks spaces between game type and blinds, ffs. I think it's obvious how I did work around that; should you ever notice games with more than 5 blanks you should be able to figure out what to do.


(VPP counter was off in that pic but is fixed in the code below)

Spoiler:
Code:
#SingleInstance, force
;#NoTrayIcon
DetectHiddenWindows, On
SetTitleMatchMode, 1					;1=start 2=contain 3=exact match

;======================================================= CONFIG SECTION =========================================================

SoundBust = C:\Program Files (x86)\PokerStars\snd\bust.wav		;sound if table closes
SoundAchieve = C:\Program Files (x86)\PokerStars\snd\ding.wav	;sound if TotalLimit reached

GuiPos = x7 y290						;position of GUI on screen 
										;move the window where you want it to be, then use WindowSpy to grab its coords
										
LoopInterval = 100						;counter update interval in msec (1000 = 1sec, default = 100)

Stake1 = $15.00							
Stake2 = $30.00							
Stake3 = $60.00							
Stake4 = $15.00							
Stake5 = $30.00							
Stake6 = $60.00							
Stake7 = $15.00							
Stake8 = $30.00							
Stake9 = $60.00							

Stake1VPP = 6.66					
Stake2VPP = 13.31						
Stake3VPP = 26.62					
Stake4VPP = 7.15											
Stake5VPP = 14.30					
Stake6VPP = 28.60						
Stake7VPP = 6.11					
Stake8VPP = 12.21											
Stake9VPP = 24.42				

Color1 = FF0000 						;color for table counter - stake1 
Color2 = FF0000							;color for table counter - stake2 
Color3 = FF0000							;color for table counter - stake3 
Color4 = 00FF00 						;color for table counter - stake4 
Color5 = 00FF00 						;color for table counter - stake5
Color6 = 00FF00							;color for table counter - stake6 
Color7 = 0000FF							;color for table counter - stake7 
Color8 = 0000FF 						;color for table counter - stake8 
Color9 = 0000FF 						;color for table counter - stake9

CurrentLimit = 14						;desired table limit (current)
TotalLimit = 100						;desired table limit (session)
SoundInterval = 25						;SoundAchieve replays after "TotalLimit" + N tables
SessionTimeLimit = 6:00					;desired session time limit (h:mm)
MaxABI = 30								;maximum desired ABI (current & session)
MaxInvest = 3000						;maximum desired investment (session)

LimitColor = 33FF33						;color of 'SessionTime' and 'TotalTables' counters after reaching their set limits 
ClockColorBreak = FF0000				;clock color indicating sync tourney break (CCCCCC to disable this option)

;----------------------------------------------------------
SlotA1x := 304							;F1
SlotA1y := 0

SlotA2x := 1112							;F2
SlotA2y := 0

SlotA3x := 1920							;F3
SlotA3y := 0

SlotA4x := 2728							;F4
SlotA4y := 0
;----------------------------------------------------------
SlotC1x := 304							;F5
SlotC1y := 299

SlotC2x := 1112							;F6
SlotC2y := 299

SlotC3x := 1920							;F7
SlotC3y := 299

SlotC4x := 2728							;F8
SlotC4y := 299
;----------------------------------------------------------
SlotB1x := 304							;F9
SlotB1y := 584

SlotB2x := 1112							;F10
SlotB2y := 584

SlotB3x := 1920							;F11
SlotB3y := 584

SlotB4x := 2728							;F12
SlotB4y := 584
;----------------------------------------------------------
;=========================================== CONFIG HOTKEYS AT BOTTOM OF THE SCRIPT =============================================

;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

;============================================================ GUI ===============================================================

Gui -MaximizeBox -Resize +AlwaysOnTop +ToolWindow -MinimizeBox
Gui, Show, W194 H616 %GuiPos%, SessionMan 2.2.09	
Gui, Color, 000000		
;___________________________________________________________ TOTALS _____________________________________________________________
						
Gui, Font, s22 cCCCCCC, Verdana					
Gui, Add, Text, x-8 y2 vTotalTables Center, 00000 / 00000	
;................................................................................................................................								
Gui, Font, s12 c555555, Verdana					
Gui, Add, Text, x9 y40 Center, -------- 6-max --------			
;___________________________________________________________ STAKE 1 ____________________________________________________________
									
Gui, Font, s8 c%Color1%, Verdana				
Gui, Add, Text, x27 y60 vControl1 Center, 00000000000000000000
								
Gui, Font, s16 c%Color1%, Verdana				
Gui, Add, Text, x20 y72 vStake1 Center, 00000 / 00000		
;........................................................... STAKE 2 ............................................................
								
Gui, Font, s8 c%Color2%, Verdana				
Gui, Add, Text, x27 y104 vControl2 Center, 00000000000000000000
								
Gui, Font, s16 c%Color2%, Verdana				
Gui, Add, Text, x20 y116 vStake2 Center, 00000 / 00000		
;........................................................... STAKE 3 ............................................................
								
Gui, Font, s8 c%Color3%, Verdana				
Gui, Add, Text, x27 y148 vControl3 Center, 00000000000000000000
								
Gui, Font, s16 c%Color3%, Verdana				
Gui, Add, Text, x20 y160 vStake3 Center, 00000 / 00000		
;................................................................................................................................		
Gui, Font, s12 c555555, Verdana					
Gui, Add, Text, x9 y190 Center, -------- 9-max --------		
;........................................................... STAKE 4 ............................................................
								
Gui, Font, s8 c%Color4%, Verdana				
Gui, Add, Text, x27 y210 vControl4 Center, 00000000000000000000
								
Gui, Font, s16 c%Color4%, Verdana			
Gui, Add, Text, x20 y222 vStake4 Center, 00000 / 00000			
;........................................................... STAKE 5 ............................................................
								
Gui, Font, s8 c%Color5%, Verdana				
Gui, Add, Text, x27 y254 vControl5 Center, 00000000000000000000
								
Gui, Font, s16 c%Color5%, Verdana			
Gui, Add, Text, x20 y266 vStake5 Center, 00000 / 00000		
;........................................................... STAKE 6 ............................................................
								
Gui, Font, s8 c%Color6%, Verdana				
Gui, Add, Text, x27 y298 vControl6 Center, 00000000000000000000
								
Gui, Font, s16 c%Color6%, Verdana				
Gui, Add, Text, x20 y310 vStake6 Center, 00000 / 00000		
;................................................................................................................................		
Gui, Font, s12 c555555, Verdana					
Gui, Add, Text, x10 y340 Center, ------ 9-max (t) ------			
;........................................................... STAKE 7 ............................................................
								
Gui, Font, s8 c%Color7%, Verdana				
Gui, Add, Text, x27 y362 vControl7 Center, 00000000000000000000
								
Gui, Font, s16 c%Color7%, Verdana				
Gui, Add, Text, x20 y374 vStake7 Center, 00000 / 00000		
;........................................................... STAKE 8 ............................................................
								
Gui, Font, s8 c%Color8%, Verdana				
Gui, Add, Text, x27 y406 vControl8 Center, 00000000000000000000
								
Gui, Font, s16 c%Color8%, Verdana			
Gui, Add, Text, x20 y418 vStake8 Center, 00000 / 00000			
;........................................................... STAKE 9 ............................................................
								
Gui, Font, s8 c%Color9%, Verdana				
Gui, Add, Text, x27 y450 vControl9 Center, 00000000000000000000
								
Gui, Font, s16 c%Color9%, Verdana			
Gui, Add, Text, x20 y462 vStake9 Center, 00000 / 00000	
;____________________________________________________________ BUYIN _____________________________________________________________
								
Gui, Font, s14 cCCCCCC, Verdana					
Gui, Add, Text, x-6 y494 vDollars Center, $0000.00 / $0000.00	
								
Gui, Font, s11 c999999, Verdana					
Gui, Add, Text, x12 y520 vTotalABI Center, $0000.00 / $0000.00	

Gui, Font, s10 c555555, Verdana					
Gui, Add, Text, x58 y540 vVPP Center, 0000.00 VPP
;___________________________________________________________ CLOCK/TIME _________________________________________________________		
								
Gui, Font, s20 cCCCCCC, Verdana					
Gui, Add, Text, x41 y558 vClock Center, 000:000			
								
Gui, Font, s12 c999999, Verdana					
Gui, Font, Bold						
Gui, Add, Text, x73 y590 vSessionTime Center, 00:00		
;================================================================================================================================	

GuiControl,, Control1, %Stake1%
GuiControl,, Control2, %Stake2%
GuiControl,, Control3, %Stake3%
GuiControl,, Control4, %Stake4%
GuiControl,, Control5, %Stake5%
GuiControl,, Control6, %Stake6%
GuiControl,, Control7, %Stake7%
GuiControl,, Control8, %Stake8%
GuiControl,, Control9, %Stake9%
;--------------------------------------------------------------------------------------------------------------------------------

Buyin_Total := 0.00
Buyin_Total_TournamentCounter := 0

H = 0
M1 = 0
M2 = -1

r0 = 0
r1 = 0
r2 = 0
r3 = 0
r4 = 0
r5 = 0
r6 = 0
r7 = 0
r8 = 0
r9 = 0

t1 = 0
t2 = 0
t3 = 0
t4 = 0
t5 = 0
t6 = 0
t7 = 0
t8 = 0
t9 = 0

VPP1 = 0
VPP2 = 0
VPP3 = 0
VPP4 = 0
VPP5 = 0
VPP6 = 0
VPP7 = 0
VPP8 = 0
VPP9 = 0

P = 0

;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


Loop
{
;------------------------------------------------------------ STAKE 1 -----------------------------------------------------------
  
    v1 := 0
    c1 := 0

    WinGet, v1, count, %Stake1% NL Hold'em [6-Max] ahk_class PokerStarsTableFrameClass

    Loop, %v1%
    	{	
    	c1 += 1
    	}

    if (t1 = 0)
		{
		GuiControl,, Stake1, 0 / 0
    	r1 = 0
		}

    if (t1 < c1)
		{
		t1 := c1 - 1
		}

    if (c1 > r1)
    	{
		t1++
    	GuiControl,, Stake1, %c1% / %t1%
    	r1 = %c1%
    	}

	else, if (c1 < r1)
    	{
		GuiControl,, Stake1, %c1% / %t1%
      	r1 = %c1%
    	}
;----------------------------------------------------------- STAKE 2 ------------------------------------------------------------

    v2 := 0
    c2 := 0

    WinGet, v2, count, %Stake2% NL Hold'em [6-Max] ahk_class PokerStarsTableFrameClass

    Loop, %v2%
    	{	
    	c2 += 1
    	}

    if (t2 = 0)
		{
		GuiControl,, Stake2, 0 / 0
    	r2 = 0
		}

    if (t2 < c2)
		{
		t2 := c2 - 1
		}

    if (c2 > r2)
    	{
		t2++
    	GuiControl,, Stake2, %c2% / %t2%
    	r2 = %c2%
    	}

	else, if (c2 < r2)
    	{
		GuiControl,, Stake2, %c2% / %t2%
      	r2 = %c2%
    	}
;----------------------------------------------------------- STAKE 3 ------------------------------------------------------------

    v3 := 0
    c3 := 0

    WinGet, v3, count, %Stake3% NL Hold'em [6-Max] ahk_class PokerStarsTableFrameClass

    Loop, %v3%
    	{	
    	c3 += 1
    	}

    if (t3 = 0)
		{
		GuiControl,, Stake3, 0 / 0
    	r3 = 0
		}

    if (t3 < c3)
		{
		t3 := c3 - 1
		}

    if (c3 > r3)
    	{
		t3++
    	GuiControl,, Stake3, %c3% / %t3%
     	r3 = %c3%
    	}

	else, if (c3 < r3)
    	{
		GuiControl,, Stake3, %c3% / %t3%
      	r3 = %c3%
    	}
;----------------------------------------------------------- STAKE 4 ------------------------------------------------------------

    v4 := 0
    v41 := 0
    v42 := 0
    v43 := 0
    v44 := 0
    v45 := 0
    c4 := 0

    WinGet, v41,count, %Stake4% NL Hold'em - Blinds ahk_class PokerStarsTableFrameClass
    WinGet, v42,count, %Stake4% NL Hold'em  - Blinds ahk_class PokerStarsTableFrameClass
    WinGet, v43,count, %Stake4% NL Hold'em   - Blinds ahk_class PokerStarsTableFrameClass
    WinGet, v44,count, %Stake4% NL Hold'em    - Blinds ahk_class PokerStarsTableFrameClass
    WinGet, v45,count, %Stake4% NL Hold'em     - Blinds ahk_class PokerStarsTableFrameClass
	
	v4 := v41 + v42 + v43 + v44 + v45

    Loop, %v4%
    	{	
    	c4 += 1
    	}

    if (t4 = 0)
		{
		GuiControl,, Stake4, 0 / 0
    	r4 = 0
		}

    if (t4 < c4)
		{
		t4 := c4 - 1
		}

    if (c4 > r4)
    	{
		t4++
    	GuiControl,, Stake4, %c4% / %t4%
    	 r4 = %c4%
    	}

	else, if (c4 < r4)
    	{
		GuiControl,, Stake4, %c4% / %t4%
      	r4 = %c4%
    	}
;----------------------------------------------------------- STAKE 5 ------------------------------------------------------------

    v5 := 0
    v51 := 0
    v52 := 0
    v53 := 0
    v54 := 0
    v55 := 0
    c5 := 0

    WinGet, v51,count, %Stake5% NL Hold'em - Blinds ahk_class PokerStarsTableFrameClass
    WinGet, v52,count, %Stake5% NL Hold'em  - Blinds ahk_class PokerStarsTableFrameClass
    WinGet, v53,count, %Stake5% NL Hold'em   - Blinds ahk_class PokerStarsTableFrameClass
    WinGet, v54,count, %Stake5% NL Hold'em    - Blinds ahk_class PokerStarsTableFrameClass
    WinGet, v55,count, %Stake5% NL Hold'em     - Blinds ahk_class PokerStarsTableFrameClass
	
	v5 := v51 + v52 + v53 + v54 + v55

    Loop, %v5%
    	{	
    	c5 += 1
    	}

    if (t5 = 0)
		{
		GuiControl,, Stake5, 0 / 0
    	r5 = 0
		}

    if (t5 < c5)
		{
		t5 := c5 - 1
		}

    if (c5 > r5)
    	{
		t5++
    	GuiControl,, Stake5, %c5% / %t5%
    	r5 = %c5%
    	}

	else, if (c5 < r5)
    	{
		GuiControl,, Stake5, %c5% / %t5%
      	r5 = %c5%
    	}
;------------------------------------------------------------ STAKE 6 -----------------------------------------------------------
  
    v6 := 0
    v61 := 0
    v62 := 0
    v63 := 0
    v64 := 0
    v65 := 0
    c6 := 0

    WinGet, v61,count, %Stake6% NL Hold'em - Blinds ahk_class PokerStarsTableFrameClass
    WinGet, v62,count, %Stake6% NL Hold'em  - Blinds ahk_class PokerStarsTableFrameClass
    WinGet, v63,count, %Stake6% NL Hold'em   - Blinds ahk_class PokerStarsTableFrameClass
    WinGet, v64,count, %Stake6% NL Hold'em    - Blinds ahk_class PokerStarsTableFrameClass
    WinGet, v65,count, %Stake6% NL Hold'em     - Blinds ahk_class PokerStarsTableFrameClass
	
	v6 := v61 + v62 + v63 + v64 + v65

    Loop, %v6%
    	{	
    	c6 += 1
    	}

    if (t6 = 0)
		{
		GuiControl,, Stake6, 0 / 0
    	r6 = 0
		}

    if (t6 < c6)
		{
		t6 := c6 - 1
		}

    if (c6 > r6)
    	{
		t6++
    	GuiControl,, Stake6, %c6% / %t6%
    	r6 = %c6%
    	}

	else, if (c6 < r6)
    	{
		GuiControl,, Stake6, %c6% / %t6%
      	r6 = %c6%
    	}
;----------------------------------------------------------- STAKE 7 ------------------------------------------------------------

    v7 := 0
    c7 := 0

    WinGet, v7, count, %Stake7% NL Hold'em [Turbo] ahk_class PokerStarsTableFrameClass

    Loop, %v7%
    	{	
    	c7 += 1
    	}

    if (t7 = 0)
		{
		GuiControl,, Stake7, 0 / 0
    	r7 = 0
		}

    if (t7 < c7)
		{
		t7 := c7 - 1
		}

    if (c7 > r7)
    	{
		t7++
    	GuiControl,, Stake7, %c7% / %t7%
    	r7 = %c7%
    	}

	else, if (c7 < r7)
    	{
		GuiControl,, Stake7, %c7% / %t7%
      	r7 = %c7%
    	}
;----------------------------------------------------------- STAKE 8 ------------------------------------------------------------

    v8 := 0
    c8 := 0

    WinGet, v8, count, %Stake8% NL Hold'em [Turbo] ahk_class PokerStarsTableFrameClass

    Loop, %v8%
    	{	
    	c8 += 1
    	}

    if (t8 = 0)
		{
		GuiControl,, Stake8, 0 / 0
    	r8 = 0
		}

    if (t8 < c8)
		{
		t8 := c8 - 1
		}

    if (c8 > r8)
    	{
		t8++
    	GuiControl,, Stake8, %c8% / %t8%
     	r8 = %c8%
    	}

	else, if (c8 < r8)
    	{
		GuiControl,, Stake8, %c8% / %t8%
      	r8 = %c8%
    	}
;----------------------------------------------------------- STAKE 9 ------------------------------------------------------------

    v9 := 0
    c9 := 0

    WinGet, v9,count, %Stake9% NL Hold'em [Turbo] ahk_class PokerStarsTableFrameClass 

    Loop, %v9%
    	{	
    	c9 += 1
    	}

    if (t9 = 0)
		{
		GuiControl,, Stake9, 0 / 0
    	r9 = 0
		}

    if (t9 < c9)
		{
		t9 := c9 - 1
		}

    if (c9 > r9)
    	{
		t9++
    	GuiControl,, Stake9, %c9% / %t9%
    	 r9 = %c9%
    	}

	else, if (c9 < r9)
    	{
		GuiControl,, Stake9, %c9% / %t9%
      	r9 = %c9%
    	}
;----------------------------------------------------------- TOTALS -------------------------------------------------------------

    c0 := c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8 + c9
    t0 := t1 + t2 + t3 + t4 + t5 + t6 + t7 + t8 + t9

    GuiControl,, TotalTables, %c0% / %t0%

    if (c0 < r0)
    	{
		SoundPlay, %SoundBust%
    	}
	
    r0 = %c0%

    if (c0 < CurrentLimit)
		{
		Gui, Font, s22 cCCCCCC, Verdana
		GuiControl, Font, TotalTables
		}

	else, if (c0 >= CurrentLimit)
		{
		Gui, Font, s22 c%LimitColor%, Verdana
		GuiControl, Font, TotalTables
		}

    if (t0 = TotalLimit)
    	{
		SoundPlay, %SoundAchieve%
		TotalLimit := t0 + SoundInterval
    	}
;----------------------------------------------------------- BUYIN --------------------------------------------------------------

Buyin_Dollars:=0.00
Buyin_Dollars_TournamentCounter:=0
Buyin_Euro:=0.00
Buyin_Euro_TournamentCounter:=0
Buyin_Session:=0.00	
Buyin_Session_TournamentCounter:=0
		
Winget,Ps_Hwnd_list,List,Ahk_Class PokerStarsTableFrameClass

Loop %Ps_Hwnd_List%
{
	Hwnd:=Ps_Hwnd_List%A_index%
	IF  !(Buyin_%hwnd%)
		{
		WingetTitle,Title,Ahk_id%Hwnd%
		IF Instr(Title,"Tournament")
			{
			IF Buyin_%Hwnd%:=GetBuyin(Title,Buyin_%Hwnd%_Currency)
				{
 				BuyIn_hwnd_list:=BuyIn_hwnd_list ? BuyIn_hwnd_list "," Hwnd : Hwnd
				Buyin_Total:=Round(Buyin_Total+Buyin_%Hwnd%,2)
			    	Buyin_Total_TournamentCounter+=1
				}
			}
		}			
}	

Loop,Parse,Buyin_Hwnd_List,`,,
{
        Hwnd:=A_LoopField      
	IF WinExist("ahk_id" Hwnd)
        	{
		Currency:=Buyin_%hwnd%_Currency	
		Buyin:=Round(Buyin_%hwnd%,2)
		IF (Currency="$")
			{	
			Buyin_Dollars:=Round(Buyin_Dollars+Buyin,2)
		        Buyin_Dollars_TournamentCounter+=1
			}
		Else  IF (Currency="€")
			{		
			Buyin_Euro:=Round(Buyin_Euro+Buyin,2)
			Buyin_Euro_TournamentCounter+=1
			}		
		Buyin_Session:=Round(Buyin_Session+Buyin,2)
		Buyin_Session_TournamentCounter+=1
		}
	Else
                { 
		Temp_list:="," Buyin_Hwnd_List "," 
		StringReplace,Temp_list,Temp_list,`,Hwnd`,,,    
	        StringTrimLeft,Temp_list,Temp_list,1
		StringTrimRight,Buyin_Hwnd_List,Temp_list,1       
		}
}	
	
IF (BuyIn_Dollars_Save != BuyIn_Dollars) Or (BuyIn_Euro_Save != BuyIn_Euro) 
{
	BuyIn_Euro_Save:=BuyIn_Euro	
	BuyIn_Euro_Avg:= Round(BuyIn_Euro/BuyIn_Euro_TournamentCounter,2)		
	BuyIn_Dollars_Save:=BuyIn_Dollars
	BuyIn_Dollars_Avg:=Round(BuyIn_Dollars/BuyIn_Dollars_TournamentCounter,2)
	BuyIn_Session_Avg:=Round(BuyIn_Session/BuyIn_Session_TournamentCounter,2)
	BuyIn_Total_Avg:=Round(BuyIn_Total/BuyIn_Total_TournamentCounter,2)
		GuiControl,,Dollars,% "$" Buyin_Dollars_Avg " / $" BuyIn_Dollars
		GuiControl,,TotalABI,% "$" BuyIn_Total_Avg " / $" BuyIn_Total
		TotalBI := Round(BuyIn_Total-BuyIn_Dollars,2)
		GuiControl,,TotalBI,% "$" TotalBI "" 
}

GetBuyin(Title,byref currency="",Byref BuyinText="")
	{
	Static CurrencyList:="$,€"
 	Haystack:=Substr(Title, Instr(Title,"Sat:")+1) ;This is for satiliets
    Loop,Parse,Currencylist,`,
    	{
        IF ((StartPosBuyin := Instr(Haystack,A_loopField)) And (EndPosBuyin := Instr(Haystack,A_space,"",StartPosBuyin)))
          	{          
           	BuyinText:=Substr(Haystack,StartPosBuyin ,(EndPosBuyin - StartPosBuyin))
         	Currency=%A_loopField%
          	Buyin:=BuyinText
	  		StringReplace,Buyin,Buyin,%Currency%,, 
			IfInString, Buyin, +R
				{	
          		StringReplace,Buyin,Buyin,+R,, 
				RebuyMulti = 3
				Buyin := Buyin * RebuyMulti					
				}
             
			IF Buyin is not number
				{ 
				Buyin:=0
				currency:=
				buyinText:=    
				}
			Break     
			}
		}
	Return Buyin 
	}
		
;----------------------------------------------------------- VPP --------------------------------------------------------------

	VPP1 := t1 * Stake1VPP
	VPP2 := t2 * Stake2VPP
	VPP3 := t3 * Stake3VPP
	VPP4 := t4 * Stake4VPP
	VPP5 := t5 * Stake5VPP
	VPP6 := t6 * Stake6VPP
	VPP7 := t7 * Stake7VPP
	VPP8 := t8 * Stake8VPP
	VPP9 := t9 * Stake9VPP
	
	VPP := Round(VPP1+VPP2+VPP3+VPP4+VPP5+VPP6+VPP7+VPP8+VPP9,2)

    GuiControl,, VPP, %VPP% VPP
	
;----------------------------------------------------------- CLOCK --------------------------------------------------------------

FormatTime, Time, %A_Now%, H:mm
GuiControl,, Clock, %Time%
StringTrimLeft, TimeOnly, A_Now, 10
StringTrimRight, Minutes, TimeOnly, 2
IfGreaterOrEqual, Minutes, 55
	{
	Gui, Font, s20 c%ClockColorBreak%
	Gui, Font, Bold
	GuiControl, Font, Clock
	}
else
	{
	Gui, Font, s20 cCCCCCC
	Gui, Font, Bold
	GuiControl, Font, Clock
	}
;----------------------------------------------------------- TIME ---------------------------------------------------------------

If (Minutes != Var)
	{
	M2 += 1
	GuiControl,, SessionTime, %H%:%M1%%M2%
	Var := Minutes
	}

If (M2 > 9)
	{
	M1 += 1
	M2 = 0
	GuiControl,, SessionTime, %H%:%M1%%M2%
	}

If (M1 > 5)
	{
	H += 1
	M1 = 0
	M2 = 0
	GuiControl,, SessionTime, %H%:%M1%%M2%
	}
	
Limit = %H%:%M1%%M2%
If (Limit = SessionTimeLimit)
	{
	Gui, Font, s12 c%LimitColor%, Verdana
	GuiControl, Font, SessionTime
	}
;----------------------------------------------------------- LOOP ---------------------------------------------------------------

   Sleep %LoopInterval%

}
return
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: HOTKEYS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

^F9::				;counter (SessionTime) reset
{
H = 0
M1 = 0
M2 = 0
Gui, Font, s12 c999999, Verdana
GuiControl, Font, SessionTime
GuiControl,, SessionTime, %H%:%M1%%M2%
}
return
;................................................................................................................................

^F10::				;counter (SessionTime) + 1
Var = -1
return
;................................................................................................................................

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TABLE MOVEMENTS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

F1::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotA1x%, %SlotA1y%
else, return
}
return
;................................................................................................................................

F2::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotA2x%, %SlotA2y%
else, return
}
return

;................................................................................................................................

F3::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotA3x%, %SlotA3y%
else, return
}
return
;................................................................................................................................

F4::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotA4x%, %SlotA4y%
else, return
}
return
;................................................................................................................................

^F3::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotA0x%, %SlotA0y%
else, return
}
return
;................................................................................................................................

F5::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotB1x%, %SlotB1y%
else, return
}
return
;................................................................................................................................

F6::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotB2x%, %SlotB2y%
else, return
}
return
;................................................................................................................................

F7::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotB3x%, %SlotB3y%
else, return
}
return
;................................................................................................................................

F8::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotB4x%, %SlotB4y%
else, return
}
return
;................................................................................................................................

F9::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotC1x%, %SlotC1y%
else, return
}
return
;................................................................................................................................

F10::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotC2x%, %SlotC2y%
else, return
}
return
;................................................................................................................................

F11::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotC3x%, %SlotC3y%
else, return
}
return
;................................................................................................................................

F12::
{
IfWinActive, ahk_class PokerStarsTableFrameClass
	WinMove, %SlotC4x%, %SlotC4y%
else, return
}
return
;................................................................................................................................
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; AUTO REG ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

^F5::
{
WinActivate, PokerStars Lobby
WinWaitActive, PokerStars Lobby
WinActivate, PokerStars Lobby
IfWinActive, PokerStars Lobby
	{
	MouseClick, left, 450, 300				;mark 1st tournament
	MouseClick, left, 600, 460				;register button
	Sleep, 1300
	WinActivate, ahk_class #32770
	MouseMove, 0, -416
	WinActivate, ahk_class PokerStarsTableFrameClass
	}
else, return
}
return
;................................................................................................................................

^F6::
{
WinActivate, PokerStars Lobby
WinWaitActive, ahk_class ahk_class #32770
WinActivate, PokerStars Lobby
IfWinActive, ahk_class #32770
	{
	MouseClick, left, 450, 315				;mark 2nd tournament
	MouseClick, left, 600, 460				;register button
	Sleep, 1300
	WinActivate, ahk_class #32770
	MouseMove, 0, -416
	WinActivate, ahk_class PokerStarsTableFrameClass
	}
else, return
}
return
;................................................................................................................................

^F7::
{
WinActivate, PokerStars Lobby
WinWaitActive, ahk_class ahk_class #32770
WinActivate, PokerStars Lobby
IfWinActive, ahk_class #32770
	{
	MouseClick, left, 450, 330				;mark 3rd tournament
	MouseClick, left, 600, 460				;register button
	Sleep, 1300
	WinActivate, ahk_class #32770
	MouseMove, 0, -416
	WinActivate, ahk_class PokerStarsTableFrameClass
	}
else, return
}
return
;................................................................................................................................

^F8::
{
WinActivate, PokerStars Lobby
WinWaitActive, ahk_class ahk_class #32770
WinActivate, PokerStars Lobby
IfWinActive, ahk_class #32770
	{
	MouseClick, left, 450, 345				;mark 4th tournament
	MouseClick, left, 600, 460				;register button
	Sleep, 1300
	WinActivate, ahk_class #32770
	MouseMove, 0, -416
	WinActivate, ahk_class PokerStarsTableFrameClass
	}
else, return
}
return
;................................................................................................................................

^Q::ExitApp
;................................................................................................................................

!Pause::Pause
;................................................................................................................................

GuiClose:
ExitApp


No payment required. I'm glad I could help. HTH HF
Table Counter AHK for PokerStars Quote
11-06-2013 , 11:14 PM
Thanks bro, you're awesome! i wish you all the best! you deserve it for your time dedication and kindness. Cheers!
Table Counter AHK for PokerStars Quote
11-08-2013 , 09:15 AM
Hi, I'm attempting to make changes to this AHK to make it for micro stakes - $3.5 turbo and reg speeds.

I've so far left only stake 4 and stake 7, changed VPP levels and VPP calculator. Do I need to do anything for the table detection to get it?
Table Counter AHK for PokerStars Quote

      
m