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

02-21-2013 , 01:32 PM
Quote:
Originally Posted by Baobhan-Sith
Ofc it should open, you must have done sth wrong. Autohotkey 1.0.48.05 (basic) is recommended, didn't test with newer versions as all my other script require 1.0.48.05 as well.

Also make sure the GuiPos is correct, ie. it doesn't draw the GUI outside your screen. Try GuiPos = x0 y0.

It tracks whatever you set up in the config section (Stake1 - Stake4).
Quote:
Originally Posted by Baobhan-Sith
Code:
;======================================================= CONFIG SECTION =========================================================

GuiPos = x1925 y5						;position of GUI on screen
edit this value

http://www.autohotkey.com/board/topi...asic-versions/
Thanks a lot for all the help, download it the older version u mention and its up and running, one last question (just to be sure)...
http://imgur.com/BGAV2tn
What are the stats im highlighting in the yellow frame?
Table Counter AHK for PokerStars Quote
02-21-2013 , 02:02 PM
ABI (current) / total invest (current)
ABI (session)
total invest (session)
Table Counter AHK for PokerStars Quote
03-05-2013 , 08:58 PM
Customized this for Don Stefanello and thought I'd post it here since it's more suitable for 180s grinders. It allows for one more stake, and the session time counter now shows hours and minutes. Also, the session ABI and total invest now go into the same line.



Description:
============================
total tables current / total tables session
----------------------------------------------
stake1
current / session

stake2
current / session

stake3
current / session

stake4
current / session

stake5
current / session
----------------------------------------------
current ABI / total invest
session ABI / total invest
----------------------------------------------
clock
session time
============================

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 = $35.00							;eg. "$35.00"
Stake5 = Gtd							;eg. "Gtd"

Color1 = B4045F 						;color for table counter - stake1 
Color2 = FF66FF							;color for table counter - stake2 
Color3 = 00AAFF							;color for table counter - stake3 
Color4 = 58FAAC 						;color for table counter - stake4 
Color5 = 00ff00 						;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 = 2.886						;stake multiplier for rebuy tourneys (ABI/Stake) 
										;!!!EDIT LINE 436!!! 

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

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

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

Gui -MaximizeBox -Resize -MinimizeBox +AlwaysOnTop +ToolWindow 
Gui, Show, %GuiPos%
Gui, Show, W194 H388, SessionMan				
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 y272 vDollars Center, $0000.00 / $0000.00	
								
Gui, Font, s11 c999999, Verdana					
Gui, Add, Text, x12 y298 vTotalABI Center, $0000.00 / $0000.00	
;___________________________________________________________ CLOCK/TIME _________________________________________________________
								
Gui, Font, s18 c555555, Verdana					
Gui, Add, Text, x7 y298 Center, ____________			
								
Gui, Font, s20 cCCCCCC, Verdana					
Gui, Add, Text, x41 y329 vClock Center, 000:000			
								
Gui, Font, s12 c999999, Verdana					
Gui, Font, Bold						
Gui, Add, Text, x73 y362 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
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


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
}

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 = 2.886
				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
Here are the sound files I use, extract them to stars' "snd" folder:
http://ul.to/7kiqhznx
Table Counter AHK for PokerStars Quote
03-06-2013 , 02:36 AM
hi Baobhan-Sith


u can help me?

i need a tablecounter with:

total tables current / total tables session
------------------------------------------
stake1 ( 1.5$)
current / session

stake2 (3.5$)
current / session
------------------------------------------
session time




thanks very much for the help.


p.d: is posibble add profit session?

p.d: sorry for me ****** english, i dont speak english.

Last edited by macareo; 03-06-2013 at 02:42 AM.
Table Counter AHK for PokerStars Quote
03-06-2013 , 11:45 AM
There ya go:



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 = $1.50							;eg. "$3.50+R"
Stake2 = $3.50							;eg. "$8.00"

Color1 = B4045F 						;color for table counter - stake1 
Color2 = FF66FF							;color for table counter - stake2 

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)

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

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

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

Gui -MaximizeBox -Resize -MinimizeBox +AlwaysOnTop +ToolWindow 
Gui, Show, %GuiPos%
Gui, Show, W160 H164, SessionManJr				
Gui, Color, 000000		
;___________________________________________________________ TOTALS _____________________________________________________________
						
Gui, Font, s22 cCCCCCC, Verdana					
Gui, Add, Text, x-26 y1 vTotalTables Center, 00000 / 00000	
								
Gui, Font, s18 c555555, Verdana					
Gui, Add, Text, x5 y14 Center, __________				
;___________________________________________________________ STAKE 1 ____________________________________________________________
									
Gui, Font, s8 c%Color1%, Verdana				
Gui, Add, Text, x11 y45 vControl1 Center, 00000000000000000000
								
Gui, Font, s16 c%Color1%, Verdana				
Gui, Add, Text, x3 y57 vStake1 Center, 00000 / 00000		
;........................................................... STAKE 2 ............................................................
								
Gui, Font, s8 c%Color2%, Verdana				
Gui, Add, Text, x11 y89 vControl2 Center, 00000000000000000000
								
Gui, Font, s16 c%Color2%, Verdana				
Gui, Add, Text, x3 y101 vStake2 Center, 00000 / 00000	
;___________________________________________________________ CLOCK/TIME _________________________________________________________
								
Gui, Font, s18 c555555, Verdana					
Gui, Add, Text, x5 y104 Center, __________										
								
Gui, Font, s16 c999999, Verdana					
Gui, Font, Bold						
Gui, Add, Text, x47 y134 vSessionTime Center, 00:00		
;================================================================================================================================	

GuiControl,, Control1, %Stake1%
GuiControl,, Control2, %Stake2%
;--------------------------------------------------------------------------------------------------------------------------------

H = 0
M1 = 0
M2 = -1

r0 = 0
r1 = 0
r2 = 0

t1 = 0
t2 = 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%
    	}
;----------------------------------------------------------- TOTALS -------------------------------------------------------------

    c0 := c1 + c2 
    t0 := t1 + t2 

    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
StringTrimLeft, TimeOnly, A_Now, 10
StringTrimRight, Minutes, TimeOnly, 2
;----------------------------------------------------------- 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
And no, I'm not going to implement session profit. Surely it's possible but way too complicated. This script only uses data from window titles, no file reads etc. I'm sorry.

Last edited by Baobhan-Sith; 03-06-2013 at 11:51 AM.
Table Counter AHK for PokerStars Quote
03-06-2013 , 12:45 PM
Weeeee thank u very much. Is perfect to me (y)
Table Counter AHK for PokerStars Quote
03-08-2013 , 01:03 PM
how about adding a minimize window feature to the 180s script?
Table Counter AHK for PokerStars Quote
03-08-2013 , 02:59 PM
Just search for "-MinimizeBox" and remove it

edit: odd, that doesn't do it, I'll look into it after my session
Table Counter AHK for PokerStars Quote
03-08-2013 , 07:56 PM
Potamito, you have to remove both -MinimizeBox and +ToolWindow from the first GUI command.
Table Counter AHK for PokerStars Quote
03-08-2013 , 08:12 PM
Done, ty
Table Counter AHK for PokerStars Quote
03-21-2013 , 12:58 PM
Quote:
Originally Posted by Baobhan-Sith
Customized this for Don Stefanello and thought I'd post it here since it's more suitable for 180s grinders. It allows for one more stake, and the session time counter now shows hours and minutes. Also, the session ABI and total invest now go into the same line.
Hey man. Don't suppose there's any chance you could help me out is there? I want pretty much the same thing but with a couple of lines removed. As follows but also with $35's removed. Would really appreciate your help.

Description:
============================
total tables current / total tables session
----------------------------------------------
stake1
current / session

stake2
current / session

stake3
current / session

stake4
current / session

stake5
current / session
----------------------------------------------
session ABI
----------------------------------------------
clock
session time
============================
Table Counter AHK for PokerStars Quote
03-21-2013 , 01:48 PM
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
Table Counter AHK for PokerStars Quote
03-21-2013 , 06:01 PM
You're a good egg, Baobhan. Tytyty. Really appreciate it.
Table Counter AHK for PokerStars Quote
03-25-2013 , 11:55 AM
Quote:
Originally Posted by Baobhan-Sith
Customized this for Don Stefanello and thought I'd post it here since it's more suitable for 180s grinders. It allows for one more stake, and the session time counter now shows hours and minutes. Also, the session ABI and total invest now go into the same line.



Description:
============================
total tables current / total tables session
----------------------------------------------
stake1
current / session

stake2
current / session

stake3
current / session

stake4
current / session

stake5
current / session
----------------------------------------------
current ABI / total invest
session ABI / total invest
----------------------------------------------
clock
session time
============================

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 = $35.00							;eg. "$35.00"
Stake5 = Gtd							;eg. "Gtd"

Color1 = B4045F 						;color for table counter - stake1 
Color2 = FF66FF							;color for table counter - stake2 
Color3 = 00AAFF							;color for table counter - stake3 
Color4 = 58FAAC 						;color for table counter - stake4 
Color5 = 00ff00 						;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 = 2.886						;stake multiplier for rebuy tourneys (ABI/Stake) 
										;!!!EDIT LINE 436!!! 

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

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

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

Gui -MaximizeBox -Resize -MinimizeBox +AlwaysOnTop +ToolWindow 
Gui, Show, %GuiPos%
Gui, Show, W194 H388, SessionMan				
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 y272 vDollars Center, $0000.00 / $0000.00	
								
Gui, Font, s11 c999999, Verdana					
Gui, Add, Text, x12 y298 vTotalABI Center, $0000.00 / $0000.00	
;___________________________________________________________ CLOCK/TIME _________________________________________________________
								
Gui, Font, s18 c555555, Verdana					
Gui, Add, Text, x7 y298 Center, ____________			
								
Gui, Font, s20 cCCCCCC, Verdana					
Gui, Add, Text, x41 y329 vClock Center, 000:000			
								
Gui, Font, s12 c999999, Verdana					
Gui, Font, Bold						
Gui, Add, Text, x73 y362 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
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


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
}

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 = 2.886
				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
Here are the sound files I use, extract them to stars' "snd" folder:
http://ul.to/7kiqhznx

Amazing Job!

Im newbie with AHK ^^, how can i make a script with this:

Table counter.
Session Profit
and the most important: Auto sit in the cash tables.

For example. F1 for auto sit in the tables. F2 for stop.

Is possible to make something like, sit in the tables only if in the table exist a player marked with the color green?


Thank you. And amazing job bro,congratz.
Table Counter AHK for PokerStars Quote
03-25-2013 , 01:12 PM
In order to track session profit I think you'd either have to read HH's/TS's directly or handle and implement SQL queries, neither of which I know how to accomplish.

As for auto sit in etc you might want to have a look at TimeOutHelper and/or StarsHotkeys, but there might be other scripts better suitable for cash game players. I'm a tourney guy so idk.

As for your last question, afaik this is basically what table scanners like TableScan Turbo etc do.

I'm sorry I can't be of better help here, anyway gl and ty for your kind words.
Table Counter AHK for PokerStars Quote
03-25-2013 , 02:06 PM
Hi, first, thanks for you answer ^^

Can you tell me one example of auto seat and auto waiting list?

This is so complicated for me, the auto seat of thee others .ahk scripts, doesnt work
Table Counter AHK for PokerStars Quote
03-25-2013 , 03:36 PM
Quote:
Originally Posted by angellopez
Can you tell me one example of auto seat and auto waiting list?
Quote:
Originally Posted by Baobhan-Sith
afaik this is basically what table scanners like TableScan Turbo etc do
Ether try this or ask here, other than that I'm clueless myself.
Table Counter AHK for PokerStars Quote
04-02-2013 , 12:29 PM
Hey sorry AHK noob here,

I just wanted the still in / total tourneys that is at the to and the avg buyin at the bottom but how do I get rid of all the dead space?

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 = $35.00							;eg. "$35.00"
Stake5 = Gtd							;eg. "Gtd"

Color1 = B4045F 						;color for table counter - stake1 
Color2 = FF66FF							;color for table counter - stake2 
Color3 = 00AAFF							;color for table counter - stake3 
Color4 = 58FAAC 						;color for table counter - stake4 
Color5 = 00ff00 						;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 = 2.886						;stake multiplier for rebuy tourneys (ABI/Stake) 
										;!!!EDIT LINE 436!!! 

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

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

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

Gui -MaximizeBox -Resize -MinimizeBox +AlwaysOnTop +ToolWindow 
Gui, Show, %GuiPos%
Gui, Show, W194 H300, SessionMan				
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, ____________						
;____________________________________________________________ BUYIN _____________________________________________________________
								
Gui, Font, s18 c555555, Verdana					
Gui, Add, Text, x7 y240 Center, ____________			
								
Gui, Font, s14 cCCCCCC, Verdana					
Gui, Add, Text, x-6 y272 vDollars Center, $0000.00 / $0000.00	
								
Gui, Font, s11 c999999, Verdana					
Gui, Add, Text, x12 y298 vTotalABI Center, $0000.00 / $0000.00	
;___________________________________________________________ CLOCK/TIME _________________________________________________________
								
Gui, Font, s18 c555555, Verdana					
Gui, Add, Text, x7 y298 Center, ____________			
								
Gui, Font, s20 cCCCCCC, Verdana					
Gui, Add, Text, x41 y329 vClock Center, 000:000			
								
Gui, Font, s12 c999999, Verdana					
Gui, Font, Bold						
Gui, Add, Text, x73 y362 vSessionTime Center, 00:00		
;========================================================================================	

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
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


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
}

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 = 2.886
				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
Table Counter AHK for PokerStars Quote
04-02-2013 , 07:20 PM
Code:
Gui -MaximizeBox -Resize -MinimizeBox +AlwaysOnTop +ToolWindow 
Gui, Show, %GuiPos%
Gui, Show, W194 H300, SessionMan				
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, ____________						
;____________________________________________________________ BUYIN _____________________________________________________________
								
Gui, Font, s18 c555555, Verdana					
Gui, Add, Text, x7 y240 Center, ____________			
								
Gui, Font, s14 cCCCCCC, Verdana					
Gui, Add, Text, x-6 y272 vDollars Center, $0000.00 / $0000.00	
								
Gui, Font, s11 c999999, Verdana					
Gui, Add, Text, x12 y298 vTotalABI Center, $0000.00 / $0000.00	
;___________________________________________________________ CLOCK/TIME _________________________________________________________
								
Gui, Font, s18 c555555, Verdana					
Gui, Add, Text, x7 y298 Center, ____________			
								
Gui, Font, s20 cCCCCCC, Verdana					
Gui, Add, Text, x41 y329 vClock Center, 000:000			
								
Gui, Font, s12 c999999, Verdana					
Gui, Font, Bold						
Gui, Add, Text, x73 y362 vSessionTime Center, 00:00
You're on the right way, now just edit the red parts. Should also prob delete the blue part at all, otherwise you'd have 2 separator lines between vTotalTables and vDollars.
Table Counter AHK for PokerStars Quote
04-02-2013 , 07:36 PM
ahh right on!

oh and I forgot one more thing, how would I go about adding a running total of buyins for the day?

thank you!
Table Counter AHK for PokerStars Quote
04-02-2013 , 07:39 PM
It's already there:
Code:
Gui, Font, s11 c999999, Verdana					
Gui, Add, Text, x12 y298 vTotalABI Center, $0000.00 / $0000.00
^gui section
Code:
GuiControl,,TotalABI,% "$" BuyIn_Total_Avg " / $" BuyIn_Total
^buyin section
Table Counter AHK for PokerStars Quote
05-13-2013 , 05:46 PM
Hey, help me add to this ahk function to minimalize to tray.

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

TimeLimit=800	;desired session time in minutes (choose a 4-digit number to disable color change)

numtables:=0
TotalTabelsOpend:=0
Mins:=-1
Var:=-1


Menu,TableCounter,Add,Minimize To Tray,Minimize
Menu,TableCounter,Add,Reset Counter, ResetCounter
Menu,Tablecounter,Add,Exit,GuiClose

Gui -MaximizeBox  -Resize  -MinimizeBox -AlwaysOnTop  +Caption  +LastFound ;  Change +/- Caption To remove Or Add titlebar
Gui, Font, s12 c999999, Verdana
Gui, Add, Text, y+8 c999999 vSessionTime Center, 000 Min
Gui, Color, 000000
Gui, Font, s20 cWhite, Verdana

Gui,Margin,10,10

Gui, Add, Text, y+ cGreen vTotalTabelsOpend Center,0000

Gui, Show,    AutoSize , Tbls
TabelCounterHwnd:=winExist()

OnMessage(0x201, "WM_LBUTTONDOWN")
SetTimer,TableCounter,1000
REturn    

; NumTables counts evry table ( also Non Seated tables and the Replayer )
; TotalTabelsOpend only Counts tables where you where Seated
; RightClick the window to Get a menu to Reset Or Close TableCounter  | Minimize  To Tray
; Hold Left button down to drag window
; Change -Caption To Remove Titlebar or +Caption To Add Titlebar
 


TableCounter:

    numtables := 0

    ;snippet will find all pokerstars windows
    WinGet, Id, list, ahk_class PokerStarsTableFrameClass,, Program Manager
    Loop,%Id%
    {

	FormatTime, Minutes, %A_Now%, m

	If (Minutes != Var)
		{
		Mins += 1
		GuiControl,, SessionTime, %Mins% Min
		Var := Minutes
		}

	If (Mins >= TimeLimit)
		{
		Gui, Font, s12 c00ff00
		GuiControl, Font, SessionTime
		}

         Hwnd:=id%A_index%
       
       
         numtables += 1
        IF  Hwnd not in  %TableHwndList% 
        { 
        	WinGettitle,Title,ahk_id%hwnd%
      		IF  Instr(Title," Logged In as ")
       		{
        	
                	
                	TableHwndList:= TableHwndList ?  TableHwndList . "," . Hwnd : Hwnd
       				TotalTabelsOpend+=1
 	        	
       		}    
    	}
   }


    if (numtables != lasttables) OR  (SaveTotalTabelsOpend != TotalTabelsOpend)
    {
      IF TrayCounter 
       WinSetTitle,Ahk_id%TabelCounterHwnd%,,%numtables% / %TotalTabelsOpend% 
       
      GuiControl,, MyControl, %numtables%
        lasttables = %numtables%
        SaveTotalTabelsOpend = %TotalTabelsOpend%
        GuiControl,, TotalTabelsOpend,%TotalTabelsOpend%
    
    }


return

Minimize: 
Gui,Minimize
WinSetTitle,Ahk_id%TabelCounterHwnd%,,%numtables% / %TotalTabelsOpend%
Return

GuiSize:
  TrayCounter := A_EventInfo=1 ? 1 : 0

Return

GuiContextMenu:
Menu, TableCounter, Show  
Return


ResetCounter:
TotalTabelsOpend:=0
GuiControl,, TotalTabelsOpend,0 
Return
;--------------------------------------------------------------------------------------------------------------------------------
F11::								;counter (SessionTime) reset
Mins = 0
Gui, Color, 000000
Gui, Font, s12 c999999
GuiControl, Font, SessionTime
GuiControl,, SessionTime, %Mins% Min
return

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

GuiClose:
ExitApp

Return
Table Counter AHK for PokerStars Quote
05-17-2013 , 02:48 PM
Hi. Is anyone able to help?

I'd like an AHK that simply displays the number of current Pokerstars cash games that the player is seated at.

The below post includes a counter that increments whenever a cash table is joined, but it doesn't decrease when a table is left. I've tried taking a look to see if I could figure it out but with no success!

I happily transfer the cost of a drink or two (or more if it's a time-consuming task.)


Quote:
Originally Posted by MaxThread
Code:
#SingleInstance,force
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance,Force

numtables:=0
TotalTabelsOpend:=0
cash:=0

Menu,TableCounter,Add,Minimize To Tray,Minimize
Menu,TableCounter,Add,Reset Counter, ResetCounter
Menu,Tablecounter,Add,Exit,GuiClose

Gui -MaximizeBox -MinimizeBox +AlwaysOnTop +Caption +LastFound ; Change +/- Caption To remove Or Add titlebar
Gui, Color, 000000
Gui, Font, s20 cWhite, Verdana

Gui,Margin,10,10
Gui, Add, Text, c00FFFF vMyControl Center,000000
Gui, Add, Text, y+ cGreen vTotalTabelsOpend Center,000000
Gui, Show, AutoSize , Tbls
TabelCounterHwnd:=winExist()

OnMessage(0x201, "WM_LBUTTONDOWN")
SetTimer,TableCounter,1000
REturn



; NumTables counts evry table ( also Non Seated tables and the Replayer )
; TotalTabelsOpend only Counts tables where you where Seated
; RightClick the window to Get a menu to Reset Or Close TableCounter | Minimize To Tray
; Hold Left button down to drag window
; Change -Caption To Remove Titlebar or +Caption To Add Titlebar



TableCounter:

numtables := 0

;snippet will find all pokerstars windows
WinGet, Id, list, ahk_class PokerStarsTableFrameClass,, Program Manager
Loop,%Id%
{
Hwnd:=id%A_index%


numtables += 1
IF Hwnd not in %TableHwndList%
{
WinGettitle,Title,ahk_id%hwnd%
IF Instr(Title," Logged In as ")
{


TableHwndList:= TableHwndList ? TableHwndList . "," . Hwnd : Hwnd
TotalTabelsOpend+=1
cash:=Round((Cash+=0.6),2) 
stringReplace,Cash,Cash,.00,,

}
}
}


if (numtables != lasttables) OR (SaveTotalTabelsOpend != TotalTabelsOpend)
{
IF TrayCounter
WinSetTitle,Ahk_id%TabelCounterHwnd%,,%numtables% / %TotalTabelsOpend%

GuiControl,, MyControl, %cash%
lasttables = %numtables%
SaveTotalTabelsOpend = %TotalTabelsOpend%
GuiControl,, TotalTabelsOpend,%TotalTabelsOpend%

}


return

Minimize:
Gui,Minimize
WinSetTitle,Ahk_id%TabelCounterHwnd%,,%cash% / %TotalTabelsOpend%
Return

GuiSize:
TrayCounter := A_EventInfo=1 ? 1 : 0

Return

GuiContextMenu:
Menu, TableCounter, Show
Return

ResetCounter:

GuiControl,, TotalTabelsOpend,% TotalTabelsOpend:=0
Return

GuiClose:
ExitApp

Return

Typo cash:== to cash:=

Last edited by MeleaB; 05-17-2013 at 02:55 PM.
Table Counter AHK for PokerStars Quote
05-17-2013 , 06:33 PM
Quote:
Originally Posted by MeleaB
Hi. Is anyone able to help?

I'd like an AHK that simply displays the number of current Pokerstars cash games that the player is seated at.

The below post includes a counter that increments whenever a cash table is joined, but it doesn't decrease when a table is left. I've tried taking a look to see if I could figure it out but with no success!

I happily transfer the cost of a drink or two (or more if it's a time-consuming task.)
seems like an easy enough request, that script seems to take a roundabout approach to it. if i have time tonight ill do it
Table Counter AHK for PokerStars Quote
05-17-2013 , 06:38 PM
I am using the very first script of table counter which is all I need:



But is there any way to show a running total figure for all the cashes during your session? Along side also the running total buy in which I see is used in the updated version? Sorry if its been asked before. I guess It would be pretty hard as it has to read the dealer chat or HHs?
Table Counter AHK for PokerStars Quote

      
m