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

10-23-2012 , 01:00 PM
I need some help with this one. I'm trying to merge some different scripts into just one which works perfectly fine except for the 'RebuyMulti'. How can I use this variable within the GetBuyin block (line 435)?



Code:
#SingleInstance, force
#NoTrayIcon
DetectHiddenWindows, On
SetTitleMatchMode, 2
;======================================================= CONFIG SECTION =========================================================

GuiPos = x1925 y5						;position of GUI on screen

LoopInterval = 100						;update interval in msec (1000 = 1sec)

CurrentLimit = 14						;desired table limit (current)
TotalLimit = 100						;desired table limit (total)
TimeLimit = 300							;desired time limit in minutes

MaxABI = 12							;maximum desired ABI
MaxInvest = 1200						;maximum desired investment

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

SoundInterval = 20						;SoundTotal replays after "N" additional tables

Stake1 = Gtd 							;eg. $2.50 or $0.25/$0.50

Stake2 = $8.00							;eg. $3.50+R or $0.50/$1

Stake3 = $3.50+R						;eg. $8.00 or $5/$10

Stake4 = $15.00							;eg. $8.00 or $5/$10

RebuyMulti = 3.2857						;stake multiplier for rebuy tourneys (ABI/Stake) 
								;!!!EDIT NUMERIC VALUE AT LINE 435!!! 

Color1 = FF0000							;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

LimitColor = 33FF33						;color of any 'Limit' control if its limit reached 

MaxColor = FF0000						;color of any 'ABI/Invest' control if its limit reached

ClockColorBreak = FF0000					;clock color during break (XX.55 - XX.59)


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

Gui -MaximizeBox -Resize -MinimizeBox +AlwaysOnTop +ToolWindow 
Gui, Show, %GuiPos%
Gui, Show, W180 H356, SessionMan				
Gui, Color, 000000
;===============================================================
						
Gui, Font, s22 cDDDDDD, Verdana					
Gui, Add, Text, x-13 y1 vSum Center, 00000 / 00000			
;_______________________________________________________________
								
Gui, Font, s18 c555555, Verdana					
Gui, Add, Text, x7 y14 Center, ___________				
									
Gui, Font, s8 c%Color1%, Verdana				
Gui, Add, Text, x22 y45 vControl1 Center, 00000000000000000000
								
Gui, Font, s16 c%Color1%, Verdana				
Gui, Add, Text, x14 y57 vStake1 Center, 00000 / 00000		
;...............................................................
								
Gui, Font, s8 c%Color2%, Verdana				
Gui, Add, Text, x22 y89 vControl2 Center, 00000000000000000000
								
Gui, Font, s16 c%Color2%, Verdana				
Gui, Add, Text, x14 y101 vStake2 Center, 00000 / 00000		
;...............................................................
								
Gui, Font, s8 c%Color3%, Verdana				
Gui, Add, Text, x22 y133 vControl3 Center, 00000000000000000000
								
Gui, Font, s16 c%Color3%, Verdana				
Gui, Add, Text, x14 y145 vStake3 Center, 00000 / 00000		
;...............................................................
								
Gui, Font, s8 c%Color4%, Verdana				
Gui, Add, Text, x22 y177 vControl4 Center, 00000000000000000000
								
Gui, Font, s16 c%Color4%, Verdana			
Gui, Add, Text, x14 y189 vStake4 Center, 00000 / 00000		
;_______________________________________________________________
								
Gui, Font, s18 c555555, Verdana					
Gui, Add, Text, x7 y196 Center, ___________			
								
Gui, Font, s14 cCCCCCC, Verdana					
Gui, Add, Text, x-13 y226 vDollars Center, $0000.00 / $0000.00	
								
Gui, Font, s11 c999999, Verdana					
Gui, Add, Text, x46 y252 vTotalABI Center, ($0000.00)		
								
Gui, Font, s11 c999999, Verdana					
Gui, Add, Text, x46 y274 vTotalInvest Center, ($0000.00)			
;_______________________________________________________________
								
Gui, Font, s18 c555555, Verdana					
Gui, Add, Text, x7 y273 Center, ___________			
								
Gui, Font, s20 cCCCCCC, Verdana					
Gui, Add, Text, x33 y301 vClock Center, 000:000			
								
Gui, Font, s12 c999999, Verdana					
Gui, Font, Bold							
Gui, Add, Text, x55 y333 vSessionTime Center, 000 Min		
;===============================================================	

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

Buyin_Total := 0.00
Buyin_Total_TournamentCounter := 0

Mins = -1

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

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

Loop
{
;--------------------------------------------------------------------------------------------------------------------------------
  
    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%
    		}
;--------------------------------------------------------------------------------------------------------------------------------

    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%
    		}
;--------------------------------------------------------------------------------------------------------------------------------

    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%
    		}
;--------------------------------------------------------------------------------------------------------------------------------

    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%
    		}
;--------------------------------------------------------------------------------------------------------------------------------

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

    GuiControl,, Sum, %c0% / %t0%

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

    if (c0 < CurrentLimit)
		{
		Gui, Font, s22 cDDDDDD, Verdana
		GuiControl, Font, Sum
		}

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

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

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 ")"
		GuiControl,,TotalInvest,% "($" BuyIn_Total ")"
		
		If (Buyin_Dollars_Avg >= MaxABI)
			{
			Gui, Font, s14 c%MaxColor%
			Gui, Font, Norm
			GuiControl, Font, Dollars
			}
		else		
			{
			Gui, Font, s14 cCCCCCC
			Gui, Font, Norm
			GuiControl, Font, Dollars
			}

		If (BuyIn_Total_Avg >= MaxABI)
			{
			Gui, Font, s11 c%MaxColor%
			Gui, Font, Norm
			GuiControl, Font, TotalABI
			}
		else		
			{
			Gui, Font, s11 c999999
			Gui, Font, Norm
			GuiControl, Font, TotalABI
			}	

		If (BuyIn_Total >= MaxInvest)
			{
			Gui, Font, s11 c%MaxColor%
			Gui, Font, Norm
			GuiControl, Font, TotalInvest
			}
		else		
			{
			Gui, Font, s11 c999999
			Gui, Font, Norm
			GuiControl, Font, TotalInvest
			}	
}

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,, 
				Buyin := Buyin * 3.2857
				}
             
			IF Buyin is not number
                        	{ 
                           	Buyin:=0
		           	currency:=
                           	buyinText:=    
                        	}
		Break     
		}
	}
	Return Buyin 
}
;--------------------------------------------------------------------------------------------------------------------------------

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

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

If (Mins >= TimeLimit)
	{
	Gui, Font, s12 c%LimitColor%, Verdana
	Gui, Font, Bold
	GuiControl, Font, SessionTime
	}
;--------------------------------------------------------------------------------------------------------------------------------

   Sleep %LoopInterval%

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

F9::								;counter (SessionTime) reset
Mins = 0
Gui, Font, s12 c999999, Verdana
Gui, Font, Bold
GuiControl, Font, SessionTime
GuiControl,, SessionTime, %Mins% Min
return

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

^Q::ExitApp

GuiClose:
ExitApp
Original code was posted by MaxThread here.
Table Counter AHK for PokerStars Quote
10-26-2012 , 04:46 PM
I have shortcut on my mouse with ninja for c/f option. After i used the script in page 2 i have some problems with the shortcut. Is there a possibility ahk block ninja?
Table Counter AHK for PokerStars Quote
11-02-2012 , 05:17 PM
Is this not compatible with table of interest? It had me listed playing way more tables than I did and I wondered if it was because with table of interest it has tables pop up and then go back into a stack.
Table Counter AHK for PokerStars Quote
11-02-2012 , 10:17 PM
Can't tell exactly cuz I don't have ToI, nor do I have TN.

Sry guys
Table Counter AHK for PokerStars Quote
11-03-2012 , 11:11 PM
Even without table of interest, it says I'm playing more games than I am for some reason. Not sure why it's doing that
Table Counter AHK for PokerStars Quote
11-04-2012 , 08:43 AM
What games are you playing / how did you set up the stakes?
Table Counter AHK for PokerStars Quote
11-04-2012 , 11:39 AM
6 max i changed the stakes listed in the script to $30, $60, $100, $200. It will show me playing extra $100's and $200's. Sometimes it will list me playing like 10 when I have 0 Running. I'm using the one you posted at the top of this page. Although the same thing happened with the script on the previous page. Was there something else I needed to edit besides the stakes? I also changed the table max to 20. Idk if that has any effect.
Table Counter AHK for PokerStars Quote
11-04-2012 , 01:51 PM
Ok, so it counts eg. a $200 SNG @ $50/$100 blinds twice, etc. Set "SetTitleMatchMode" to 1 (=> title has to begin with %StakeX%). I'll see if I can find a better fix (eg. actually parsing the buyin/excluding blinds) but for now this should do it, at least for games where the title begins with the buyin.

Last edited by Baobhan-Sith; 11-04-2012 at 02:02 PM.
Table Counter AHK for PokerStars Quote
11-04-2012 , 02:55 PM
ok will give it a shot, appreciate it
Table Counter AHK for PokerStars Quote
11-08-2012 , 11:12 AM
Any chance there is a similar ahk for FTP?
Table Counter AHK for PokerStars Quote
11-12-2012 , 08:04 PM
I dont know where else to ask this but do you guys know how to delete this:

Table Counter AHK for PokerStars Quote
11-13-2012 , 01:32 AM
^ This belongs in the PS Mods Thread but anyway afaik you have to edit the "message=8,30" line/coords either in the gx.ini of the theme you're using or in the gx.ini in "&default". Use TableCrab to de-/encrypt .ini files.

As to FTP support, I'm sure it's possible to make a FTP version or even a version supporting both sites at once but it will take me some time.
Table Counter AHK for PokerStars Quote
11-13-2012 , 02:01 AM
Thanks for you help Boabhan
Table Counter AHK for PokerStars Quote
11-22-2012 , 12:02 PM
Hi
How can i combine these two :

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

numtables:=0
TotalTabelsOpend:=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, vMyControl Center,0000
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%
    {
       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
;--------------------------------------------------------------------------------------------------------------------------------

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

If (Mins >= TimeLimit)
	{
	Gui, Font, s12 c%LimitColor%, Verdana
	Gui, Font, Bold
	GuiControl, Font, SessionTime
	}
;--------------------------------------------------------------------------------------------------------------------------------


GuiClose:
ExitApp

Return
and your ahk

to get sth like this:
(made in paint so lol, but u get the idea):

Table Counter AHK for PokerStars Quote
11-22-2012 , 07:41 PM
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=60 	;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  -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, vMyControl Center,0000
Gui, Add, Text, y+ cGreen vTotalTabelsOpend Center,0000
Gui, Font, s12 c999999, Verdana
Gui, Add, Text, y+8 c999999 vSessionTime Center, 000 Min
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, c00ff00
		GuiControl, Font, SessionTime
		}

       Hwnd:=id%A_index%
       
       
         numtables += 1
        IF  Hwnd not in  %TableHwndList% 
        { 
        	WinGettitle,Title,ahk_id%hwnd%
      		IF  Instr(Title," Tournament ")
       		{
        	
                	
                	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
;--------------------------------------------------------------------------------------------------------------------------------
F9::								;counter (SessionTime) reset
Mins = 0
Gui, Font, c999999
GuiControl, Font, SessionTime
GuiControl,, SessionTime, %Mins% Min
return

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


GuiClose:
ExitApp

Return
Didn't clean the code further but this should do it
Table Counter AHK for PokerStars Quote
11-22-2012 , 08:37 PM
lol wrong thread
Table Counter AHK for PokerStars Quote
12-25-2012 , 06:41 PM
For those who are interested, here is _my_ version of the TableCounter.

Its for PS but since I dont play there, its untested on that site.

Code:
; About:
; This script is based on the work of Daxonovitch and others, on 2+2 (http://forumserver.twoplustwo.com/168/free-software/table-counter-ahk-pokerstars-874680/index5.html).
; Credit goes to all the people who actually contribute to/share with the community! 
; Especially to Juk, _dave_, Roland, Baobhan-Sith and HighSteakes. Thanks!
; Author: Show`nTell
; Site: PokerStars
; Features: 
;	Displays the number of currently open tables and the number of total tables opened.
; 	Displays the duration of the session in minutes, including a timelimit. 
; 	Rightclick the GUI to open the menu .
; 	Leftclick and hold button down to drag the GUI.
; Disclaimer: Use at your own risk!
; Help : Post on 2+2 and visit http://www.autohotkey.com/docs/.

; Note: In regards to changing the code, just edit it to your likings and post the result on 2+2! If you cant do it yourself, just post a request.

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

; Set some variables
scripttitle=TableCounter
TimeLimit=60 ;  Edit here to change the desired session time in minutes. If reached, displayed number changes its color.
numtables:=0
TotalTablesOpened:=0
Mins:=-1
Var:=-1

;____CREATE THE GUI______________________________________________________________________
Menu,%scripttitle%,Add,Reset Counter,ResetCounter
Menu, %scripttitle%, Add, Reload, Reload
Menu,%scripttitle%, Add, Edit, Edit
Menu,%scripttitle%, Add, About, About
Menu,%scripttitle%,Add,Minimize To Tray,Minimize
Menu,%scripttitle%,Add,Exit,GuiClose
Gui -MaximizeBox  -MinimizeBox +AlwaysOnTop -Caption +Resize +LastFound ;   +/-Caption to add/remove titlebar.
Gui, Color, 444444
Gui, Font, s12 cWhite bold, Arial
Gui, Add, Text, x2 y3 w20 vOpenTables Right,--
Gui, Add, Text, x24 y3 w3,/ 
Gui, Add, Text, x30 y3 w25 cLime vTotalTablesOpened Left,--
Gui, Font, s11 c999999
Gui, Add, Text, x0 y22 w25 c9D9DA1 vSessionTime Right, --- 
Gui, Font, s8
Gui, Add, Text, x28 y24 c9D9DA1, Min
IniRead, gui_position, %scripttitle%.ini, window position, gui_position, Center ;  read the saved positions or center if not previously saved.
Gui, +Hwndgui_id ;  get the window's ID so we can get its position later.
Gui, Show, %gui_position% w52 h42, %scripttitle% ;  show the window at the saved position.

TableCounterHwnd:=winExist()
OnMessage(0x201, "WM_LBUTTONDOWN") 
OnExit, GetPos
SetTimer,TableCounter,1000 ;  Label "TableCounter" (below) will be executed every 1000 milliseconds.
	
Return    
;#### END AUTOEXECUTE SECTION ###########################################################


;___LABELS_______________________________________________________________________________
TableCounter:
    numtables := 0 ;  numtables is the total number of currently open tables (also non-seated tables and the replayer).
    WinGet, Id, list, ahk_class PokerStarsTableFrameClass,, Program Manager ;  will find all partypoker tables. Id is the total number of tables found and Id1 is the ahk id of the first table, Id2 is the ahk id of the second table and so on. 
	/* ;  Enable this paragraph to show results (remove "/*" and "*/"):	
	TT = 
	Content = 
	Loop, %Id%
	{
		TT = % id%A_Index%
		Content = %Content%`n%TT%
	}	
	MsgBox, Variable "Id" contains:`n`nTables:%Id%%Content%
	*/
    Loop,%Id%
    {
		FormatTime, Minutes, %A_Now%, m
		If (Minutes != Var)
		{
			Mins += 1
			GuiControl,, SessionTime, %Mins% 
			Var := Minutes
		}
		If (Mins >= TimeLimit)
		{
			Gui, Font, s11 cRed
			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
				TotalTablesOpened+=1 ;  The variable "TotalTablesOpened" is the total number of tables opened during a session.
			}    
		}	
	}
	If (numtables != lasttables) OR  (SaveTotalTablesOpened != TotalTablesOpened)
	{
		GuiControl,, OpenTables, %numtables%
		lasttables = %numtables%
		SaveTotalTablesOpened = %TotalTablesOpened%
		If (TotalTablesOpened > 99)
			TotalTablesOpened = 99
		GuiControl,, TotalTablesOpened,%TotalTablesOpened% 
	}
	Return
Minimize: 
	Gui,Minimize
	WinSetTitle,Ahk_id%TableCounterHwnd%,,%numtables% / %TotalTablesOpened%
	Return
GuiSize:
  TrayCounter := A_EventInfo=1 ? 1 : 0
	Return
GuiContextMenu:
	Menu, TableCounter, Show  
	Return
ResetCounter:
	TotalTablesOpened:=0
	GuiControl,, TotalTablesOpened,0 
	Return
Reload:
	Reload
	Return
Edit:
	Edit
	Return 
About:
WinGetPos, Gui_X, Gui_Y, Gui_W, Gui_H, ahk_id %Gui_Id%
	Gui_X -= 20
	Gui_Y += 25
	Gui, About:New, ,About
	Gui About:Default 
	Gui -MaximizeBox -SysMenu +AlwaysOnTop +ToolWindow +LastFound 
	Gui, Font, s9 norm, Arial
	Gui, Add, Text, x5 y5, This script is based on the work of Daxonovitch and others, on
	Gui, Font, bold underline
	Gui, Add, Text, x348 y5 cBlue gForumOpen, 2+2
	Gui, Font, norm
	Gui, Add, Text, x370 y5,.
	Gui, Add, Text, x5 y20, Credit goes to all the people who actually contribute to/share with the community! 
	Gui, Add, Text, x5 y35, Especially to Juk, _dave_, Roland, Baobhan-Sith and HighSteakes. Thanks!
	Gui, Font, bold
	Gui, Add, Text, x5 y65, Author: 
	Gui, Font, norm
	Gui, Add, Text, x50 y65, Show"nTell
	Gui, Font, bold
	Gui, Add, Text, x5 y80, Site: 
	Gui, Font, norm
	Gui, Add, Text, x35 y80, Pokerstars
	Gui, Font, bold
	Gui, Add, Text, x5 y95, Features: 
	Gui, Font, norm
	Gui, Add, Text, x5 y110, %A_Space%Displays the number of currently open tables and the number of total tables opened.
	Gui, Add, Text, x5 y125, %A_Space%Displays the duration of the session in minutes, including a timelimit.
	Gui, Add, Text, x5 y140, %A_Space%Rightclick the GUI to open the menu.
	Gui, Add, Text, x5 y155, %A_Space%Leftclick and hold button down to drag the GUI.
	Gui, Font, bold
	Gui, Add, Text, x5 y170, Disclaimer: 
	Gui, Font, norm
	Gui, Add, Text, x73 y170, Use at your own risk!
	Gui, Font, bold
	Gui, Add, Text, x5 y185, Help: 
	Gui, Font, norm
	Gui, Add, Text, x37 y185,Post on 
	Gui, Font, bold underline
	Gui, Add, Text, x82 y185 cblue gForumOpen,2+2 
	Gui, Font, norm
	Gui, Add, Text, x108 y185, and visit 
	Gui, Font, bold underline
	Gui, Add, Text, x159 y185 cBlue gAHKOpen, autohotkey.com
	Gui, Font, norm
	Gui, Add, Text, x251 y185,.
	Gui, Add, Button, x5 y205 w40 h15 gAboutClose, EXIT
	Gui, Show, x%Gui_X% y%Gui_Y% w470 h220, About TableCounter
	Return 
AboutClose:
	Gui, Destroy
	Return
ForumOpen:
	Run http://forumserver.twoplustwo.com/168/free-software/table-counter-ahk-pokerstars-874680/index5.html
	Return
AHKOpen:
	Run http://www.autohotkey.com/docs/
	Return
GetPos:
	WinGetPos, gui_x, gui_y, gui_w, gui_h, ahk_id %gui_id%
	If (Gui_X = "")
		Gui_X:= 52
	If (Gui_Y = "")
		Gui_Y:= 42
	IniWrite, x%gui_x% y%gui_y%, %scripttitle%.ini, window position, gui_position
	GoTo, GuiClose
	Return
GuiClose:
	ExitApp
	Return
;____HOTKEYS_____________________________________________________________________________
F9:: ;  reset counter (SessionTime).
	Mins = 0
	Gui, Font, c999999
	GuiControl, Font, SessionTime
	GuiControl,, SessionTime, %Mins% 
	Return
F10:: ;  counter (SessionTime) + 1.
	Var = -1
	Return
F12::
	GoTo, GuiClose
	Return
WM_LBUTTONDOWN()
	{
	PostMessage, 0xA1, 2
	}
	Return
	
;____END_________________________________________________________________________________

Last edited by Show`nTell; 12-25-2012 at 06:57 PM.
Table Counter AHK for PokerStars Quote
02-20-2013 , 02:01 PM
can we get a table counter that offers the same info but also for buy ins? I mean, would like a table counter hat gives me total sits played, current numbers of table open and how many for each buy in, cheers.
Table Counter AHK for PokerStars Quote
02-20-2013 , 06:19 PM
What should be different to the version in post #51?

Last edited by Baobhan-Sith; 02-20-2013 at 06:28 PM.
Table Counter AHK for PokerStars Quote
02-20-2013 , 11:38 PM
Guess none, just that obviously i miss that post, either way thanks. Another question, have anybody use that script on Post 51 and try it out on turbos 180s? Dit it work?
Table Counter AHK for PokerStars Quote
02-21-2013 , 11:54 AM
Well that's what I designed it for so yes, it's perfect to use for MTSNG. It even kinda accounts for rebuys, all you have to do is to calculate your ABI in them and put this number as "RebuyMulti" (Line 435 or so). Example:

ABI in 3r's = $11.50
RebuyMulti = 11.5/3.5 = 3.2857

Code:
IfInString, Buyin, +R
				{	
          			StringReplace,Buyin,Buyin,+R,, 
				Buyin := Buyin * 3.2857
				}
On top of that you could use the term "Gtd" as Stake1, for instance (like shown in post #51), and the table counter will then also count Gtd MTTs (MTTs with "Gtd" in their title, that is). Note that in this this case the Stake1 table counter doesn't detect non-Gtd MTTs (like some of the $27KO's), while those will still be considered in the buy-in section. Also note that the RebuyMulti will account for rebuy MTT's accordingly, except 1R1A, 2R1A and 2xChance tourneys which will be considered as FO. I could however add support for those, just lmk if needed.

Last edited by Baobhan-Sith; 02-21-2013 at 12:00 PM.
Table Counter AHK for PokerStars Quote
02-21-2013 , 12:20 PM
Quote:
Originally Posted by Baobhan-Sith
I need some help with this one. I'm trying to merge some different scripts into just one which works perfectly fine except for the 'RebuyMulti'. How can I use this variable within the GetBuyin block (line 435)?



Code:
#SingleInstance, force
#NoTrayIcon
DetectHiddenWindows, On
SetTitleMatchMode, 2
;======================================================= CONFIG SECTION =========================================================

GuiPos = x1925 y5						;position of GUI on screen

LoopInterval = 100						;update interval in msec (1000 = 1sec)

CurrentLimit = 14						;desired table limit (current)
TotalLimit = 100						;desired table limit (total)
TimeLimit = 300							;desired time limit in minutes

MaxABI = 12							;maximum desired ABI
MaxInvest = 1200						;maximum desired investment

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

SoundInterval = 20						;SoundTotal replays after "N" additional tables

Stake1 = Gtd 							;eg. $2.50 or $0.25/$0.50

Stake2 = $8.00							;eg. $3.50+R or $0.50/$1

Stake3 = $3.50+R						;eg. $8.00 or $5/$10

Stake4 = $15.00							;eg. $8.00 or $5/$10

RebuyMulti = 3.2857						;stake multiplier for rebuy tourneys (ABI/Stake) 
								;!!!EDIT NUMERIC VALUE AT LINE 435!!! 

Color1 = FF0000							;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

LimitColor = 33FF33						;color of any 'Limit' control if its limit reached 

MaxColor = FF0000						;color of any 'ABI/Invest' control if its limit reached

ClockColorBreak = FF0000					;clock color during break (XX.55 - XX.59)


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

Gui -MaximizeBox -Resize -MinimizeBox +AlwaysOnTop +ToolWindow 
Gui, Show, %GuiPos%
Gui, Show, W180 H356, SessionMan				
Gui, Color, 000000
;===============================================================
						
Gui, Font, s22 cDDDDDD, Verdana					
Gui, Add, Text, x-13 y1 vSum Center, 00000 / 00000			
;_______________________________________________________________
								
Gui, Font, s18 c555555, Verdana					
Gui, Add, Text, x7 y14 Center, ___________				
									
Gui, Font, s8 c%Color1%, Verdana				
Gui, Add, Text, x22 y45 vControl1 Center, 00000000000000000000
								
Gui, Font, s16 c%Color1%, Verdana				
Gui, Add, Text, x14 y57 vStake1 Center, 00000 / 00000		
;...............................................................
								
Gui, Font, s8 c%Color2%, Verdana				
Gui, Add, Text, x22 y89 vControl2 Center, 00000000000000000000
								
Gui, Font, s16 c%Color2%, Verdana				
Gui, Add, Text, x14 y101 vStake2 Center, 00000 / 00000		
;...............................................................
								
Gui, Font, s8 c%Color3%, Verdana				
Gui, Add, Text, x22 y133 vControl3 Center, 00000000000000000000
								
Gui, Font, s16 c%Color3%, Verdana				
Gui, Add, Text, x14 y145 vStake3 Center, 00000 / 00000		
;...............................................................
								
Gui, Font, s8 c%Color4%, Verdana				
Gui, Add, Text, x22 y177 vControl4 Center, 00000000000000000000
								
Gui, Font, s16 c%Color4%, Verdana			
Gui, Add, Text, x14 y189 vStake4 Center, 00000 / 00000		
;_______________________________________________________________
								
Gui, Font, s18 c555555, Verdana					
Gui, Add, Text, x7 y196 Center, ___________			
								
Gui, Font, s14 cCCCCCC, Verdana					
Gui, Add, Text, x-13 y226 vDollars Center, $0000.00 / $0000.00	
								
Gui, Font, s11 c999999, Verdana					
Gui, Add, Text, x46 y252 vTotalABI Center, ($0000.00)		
								
Gui, Font, s11 c999999, Verdana					
Gui, Add, Text, x46 y274 vTotalInvest Center, ($0000.00)			
;_______________________________________________________________
								
Gui, Font, s18 c555555, Verdana					
Gui, Add, Text, x7 y273 Center, ___________			
								
Gui, Font, s20 cCCCCCC, Verdana					
Gui, Add, Text, x33 y301 vClock Center, 000:000			
								
Gui, Font, s12 c999999, Verdana					
Gui, Font, Bold							
Gui, Add, Text, x55 y333 vSessionTime Center, 000 Min		
;===============================================================	

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

Buyin_Total := 0.00
Buyin_Total_TournamentCounter := 0

Mins = -1

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

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

Loop
{
;--------------------------------------------------------------------------------------------------------------------------------
  
    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%
    		}
;--------------------------------------------------------------------------------------------------------------------------------

    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%
    		}
;--------------------------------------------------------------------------------------------------------------------------------

    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%
    		}
;--------------------------------------------------------------------------------------------------------------------------------

    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%
    		}
;--------------------------------------------------------------------------------------------------------------------------------

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

    GuiControl,, Sum, %c0% / %t0%

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

    if (c0 < CurrentLimit)
		{
		Gui, Font, s22 cDDDDDD, Verdana
		GuiControl, Font, Sum
		}

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

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

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 ")"
		GuiControl,,TotalInvest,% "($" BuyIn_Total ")"
		
		If (Buyin_Dollars_Avg >= MaxABI)
			{
			Gui, Font, s14 c%MaxColor%
			Gui, Font, Norm
			GuiControl, Font, Dollars
			}
		else		
			{
			Gui, Font, s14 cCCCCCC
			Gui, Font, Norm
			GuiControl, Font, Dollars
			}

		If (BuyIn_Total_Avg >= MaxABI)
			{
			Gui, Font, s11 c%MaxColor%
			Gui, Font, Norm
			GuiControl, Font, TotalABI
			}
		else		
			{
			Gui, Font, s11 c999999
			Gui, Font, Norm
			GuiControl, Font, TotalABI
			}	

		If (BuyIn_Total >= MaxInvest)
			{
			Gui, Font, s11 c%MaxColor%
			Gui, Font, Norm
			GuiControl, Font, TotalInvest
			}
		else		
			{
			Gui, Font, s11 c999999
			Gui, Font, Norm
			GuiControl, Font, TotalInvest
			}	
}

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,, 
				Buyin := Buyin * 3.2857
				}
             
			IF Buyin is not number
                        	{ 
                           	Buyin:=0
		           	currency:=
                           	buyinText:=    
                        	}
		Break     
		}
	}
	Return Buyin 
}
;--------------------------------------------------------------------------------------------------------------------------------

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

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

If (Mins >= TimeLimit)
	{
	Gui, Font, s12 c%LimitColor%, Verdana
	Gui, Font, Bold
	GuiControl, Font, SessionTime
	}
;--------------------------------------------------------------------------------------------------------------------------------

   Sleep %LoopInterval%

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

F9::								;counter (SessionTime) reset
Mins = 0
Gui, Font, s12 c999999, Verdana
Gui, Font, Bold
GuiControl, Font, SessionTime
GuiControl,, SessionTime, %Mins% Min
return

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

^Q::ExitApp

GuiClose:
ExitApp
Original code was posted by MaxThread here.
Lets bump this. Does it also tracks $2.50? I try running the script but didnt launched, do i need to have a table open? Or does it have to launch at least the preview window? Cheers.
Table Counter AHK for PokerStars Quote
02-21-2013 , 12:28 PM
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).
Table Counter AHK for PokerStars Quote
02-21-2013 , 12:54 PM
Im running the 1.1.09.03 version, the one i can download from the ahk website, dont know who to download a older version. And also im not familiar with any script writing so...
Quote:
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).
Have no idea what you just said there :P
Table Counter AHK for PokerStars Quote
02-21-2013 , 01:03 PM
Code:
;======================================================= CONFIG SECTION =========================================================

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

http://www.autohotkey.com/board/topi...asic-versions/
Table Counter AHK for PokerStars Quote

      
m