Open Side Menu Go to the Top
Register
NEW Free Software: Stars Debustifier v0.1 (close finished tournaments) NEW Free Software: Stars Debustifier v0.1 (close finished tournaments)

02-04-2009 , 09:21 PM
Quote:
Originally Posted by Mido Ps
I use the AHK version, and works fine with me (?)

Altho, I don't see any update attempts by the client. I even DL the installer again.
I used the AHK version for a couple hours with no problems this morning, when was the PokerStars update pushed out?
NEW Free Software: Stars Debustifier v0.1 (close finished tournaments) Quote
02-04-2009 , 09:24 PM
Quote:
Originally Posted by Amerzel
I used the AHK version for a couple hours with no problems this morning, when was the PokerStars update pushed out?
Donno if there's really an update, all I know is there's a server reset at 7am ET
NEW Free Software: Stars Debustifier v0.1 (close finished tournaments) Quote
02-04-2009 , 09:25 PM
Quote:
Originally Posted by Fresh Coats
please cut/paste the ahk script, maybe that will work for me, thank you.
Assuming you were talking to me

Quote:
Originally Posted by Entropic
Code:
;DebustifierAHK v0.1 by Entropic on the 2p2 forums (http://forumserver.twoplustwo.com/)

#Persistent
KickMessage = MSG_TABLE_SIT_KICK		;This is the line we're looking for in the log file 
hwnd =									;Handle of the window we're trying to close

SetTimer, FileCheck						;We use a timer to read the file as it changes

;----------------------------------------------------------------------
;----------------------------------------------------------------------
if A_OSVersion in WIN_VISTA 
{
	LogFilePath = %A_AppData%\Pokerstars\PokerStars.log.0
}
else 
{
	LogFilePath = %A_ProgramFiles%\Pokerstars\PokerStars.log.0
}
;----------------------------------------------------------------------
;If you installed PokerStars in a custom directory Comment out the 8 lines above (aside from #Persistent)
;uncomment the one below. Then modify the line below to the path to your PokerStars.log.0 file
;LogFilePath = C:\PokerStars\PokerStars.log.0
;----------------------------------------------------------------------


;This function opens the PokerStars.log.0 file and only looks at the last few lines of it
Debustify()
{
	global KickMessage
	global LogFilePath
	global hwnd
	
	IfExist, %LogFilePath%				;The log file does exist			
	{
		FileContents := Tail(500, LogFilePath)
	}
	else								;Log file doesn't exist, we're in trouble, exit
	{
		Msgbox, "Path to logfile "%LogFilePath%" does not exist"
		ExitApp
	}
	
	;The string we're looking for looks something like this
	;MSG_TABLE_SIT_KICK 00010FE0 'You finished the tournament in 7th place,
	;We check each each of the lines we pulled from the file above
	
	Loop, parse, FileContents, `n, `r
	{
		hwnd =
		if InStr(A_LoopField, KickMessage)			;If we find the kick message a tourney has ended
		{
	        hwnd := SubStr(A_LoopField, 19, 9)		;Parse out the handle of the window so we can close it
	        hwnd := "0x" . hwnd						;Put it in autohotkey format 0x000F1939
		StringReplace, hwnd, hwnd, %A_SPACE%,,
	        PostMessage, 0x10, 0, 0,, ahk_id %hwnd% 	;Close the window
		}
	} 
}

;Tail function by Laszlo of the AutoHotkey forums
Tail(k,file)   ; Return the last k lines of file
{
   Loop Read, %file%
   {
      i := Mod(A_Index,k)
      L%i% = %A_LoopReadLine%
   }
   L := L%i%
   Loop % k-1
   {
      IfLess i,1, SetEnv i,%k%
      i--      ; Mod does not work here
      L := L%i% "`n" L
   }
   Return L
}

;This function/label compares the size of the file now to the last time it checked
;If they're different the file has been updated and we need to scan for finished tournaments again
FileCheck:			
   FileGetSize Size, %LogFilePath%		
   If Size0 >= %Size%
      Return
   If Size0 =							;No changes to the file
   {
      Size0 = %Size%
      Return
   }
   Size0 = %Size%						;File has been changed, store the new size 
   Debustify()							;Call the function to check the log file for new finished tournaments
Return
I just DLed the stars installation, just in case my client doesn't updating for some reason, and played a set. Still works like a charm as usual.
NEW Free Software: Stars Debustifier v0.1 (close finished tournaments) Quote
02-05-2009 , 12:16 AM
Sorry for the delay, I've pretty much quit playing poker so I'm checking these forums much less often. I started up a tourney to test it out, if it works I'll post the code soon. I added a GUI so you don't have to muck about in code file if you don't want to.
NEW Free Software: Stars Debustifier v0.1 (close finished tournaments) Quote
02-05-2009 , 01:00 AM
Alright I tested it and it worked for me. Let me know if you encounter any problems, just copy and paste this into a new text file and save it as Debustifier.ahk or whatever you like. You need AutoHotKey installed to run this.

- It now has a GUI
- It now minimizes to the system tray
- Pressing F12 Enables/Disables the script so you can easily keep a tournament open if you want without switching between dialogs. If you want to change it to something else it's the line (F12::Suspend) in the script.
- Stores settings in an INI, if you have any issues try deleting the INI and starting the program again.
- If you want to donate a few bucks my screen name on stars is 'drunkelf3141'


Code:
; DebustifierAHK v0.2 by Entropic on the 2p2 forums (http://forumserver.twoplustwo.com/)
; If you'd like to donate a few bucks my name on PokerStars is DrunkElf3141
; Hope you enjoy

IfNotExist, debustifier.ini  ;if no settings are stored
	{
		If A_OSVersion in WIN_VISTA		;if it's vista the default path is in AppData
				IniWrite, %A_AppData%\Pokerstars\PokerStars.log.0, debustifier.ini, LogFile, Path
		Else							;if it's xp/2k/ME/98 it's in program files so use that as the default path
				IniWrite, %ProgramFiles%\Pokerstars\PokerStars.log.0, debustifier.ini, LogFile, Path
	}
	
IniRead, LogFilePath, debustifier.ini, LogFile, Path, %A_ProgramFiles%\Pokerstars\PokerStars.log.0

If (LogFilePath = "")
	{
		IniWrite, %ProgramFiles%\Pokerstars\PokerStars.log.0, debustifier.ini, LogFile, Path
		LogFilePath = %ProgramFiles%\Pokerstars\PokerStars.log.0
	}
	
Gui, Add, Text, Path to PokerStars Log File
Gui, Add, Edit, x5 y5 w230 vLogFilePath, %LogFilePath%
Gui, Add, Button, x5 w230 gEnableButton vEnableButton, Enable
Menu, Tray, NoStandard
Menu, Tray, Add, Restore, Restore
Menu, Tray, Add, Exit, GuiClose
Menu, Tray, Default, Restore
Gui, Submit
Gui, Show,, DebustifierAHK v0.2

KickMessage = MSG_TABLE_SIT_KICK		;This is the line we're looking for in the log file
hwnd =									;Handle of the window we're trying to Close

CurrentlyEnabled = 1					;Change this to 0 to make the script start Enabled by default

EnableButton:
	If (CurrentlyEnabled = 0)			;If it's disabled enable it
		{
			Gui, Submit, NoHide
			IniWrite, %LogFilePath%, debustifier.ini, LogFile, Path		;Rewrite the path in the INI in case the user changed anything
			SetTimer, FileCheck, On										;We use a timer to read the file as it changes
			GuiControl, Text, EnableButton, Disable
			CurrentlyEnabled = 1
		}
	Else
		{
			SetTimer, FileCheck, Off
			GuiControl, Text, EnableButton, Enable
			CurrentlyEnabled = 0
		}
Return

;This function/label compares the size of the file now to the last time it was checked
;If they're different the file has been updated and we need to scan for finished tournaments again
FileCheck:
	IfNotExist, %LogFilePath%				;The log file does not Exist
		{
			MsgBox, Path to logfile "%LogFilePath%" does not Exist
			CurrentlyEnabled = 0
			SetTimer, FileCheck, Off
			GuiControl, Text, EnableButton, Enable
			Return
		}

	FileGetSize Size, %LogFilePath%
	If Size0 >= %Size%
			Return
	If Size0 =							;No changes to the file
		{
			Size0 = %Size%
			Return
		}
	Size0 = %Size%						;File has been changed, store the new size
	Debustify()							;Call the function to Check the log file for new finished tournaments
Return

GuiClose:								;Store settings and exit
	Gui, Submit
	IniWrite, %LogFilePath%, debustifier.ini, LogFile, Path
	ExitApp
Return

;Minimize the GUI to the System Tray
GuiSize:
	If (A_EventInfo = 1)	; Check if they clicked the minimize button (1=Yes)
		{
			GuiWidth:=A_GuiWidth
			GuiHeight:=A_GuiHeight
			WinGetPos, GuiX, GuiY, , , Debustifier, , ,
			If (GuiWidth = 0) && If (GuiHeight = 0) && If (GuiX = -32000) && If (GuiY = -32000)
					Gui, 1:Hide
		}
Return

;Label for the 'Restore' item in the system tray context menu
Restore:
	Gui, 1:Show
Return

Debustify()
	{
		global LogFilePath
		global KickMessage
		global LogFilePath
		global hwnd

		FileContents := Tail(500, LogFilePath)
		;The string we're looking for looks something like this
		;MSG_TABLE_SIT_KICK 00010FE0 'You finished the tournament in 7th place,
		;We check each each of the lines we pulled from the file above

		Loop, Parse, FileContents, `n, `r
			{
				hwnd =
				If (InStr(A_LoopField, KickMessage))			;If we find the kick message a tourney has ended
					{
						hwnd := SubStr(A_LoopField, 19, 9)		;Parse out the handle of the window so we can Close it
						hwnd := "0x" . hwnd						;Put it in autoHotkey format 0x000F1939
						StringReplace, hwnd, hwnd, %A_Space%,,
						PostMessage, 0x10, 0, 0,, ahk_id %hwnd% 	;Close the window
					}
			}
	}

;Tail function by Laszlo of the AutoHotkey forums
Tail(k,file)   ; Return the last k lines of file
	{
		Loop Read, %file%
			{
				i := Mod(A_Index,k)
				L%i% = %A_LoopReadLine%
			}
		L := L%i%
		Loop % k-1
			{
				IfLess i,1, SetEnv i,%k%
				i--      ; Mod does not work here
				L := L%i% "`n" L
			}
		Return L
	}
NEW Free Software: Stars Debustifier v0.1 (close finished tournaments) Quote
02-05-2009 , 02:45 AM
tyvm entropic, works just fine now. i'll ship some dough at some point in the next few weeks when i have some to spare.
NEW Free Software: Stars Debustifier v0.1 (close finished tournaments) Quote
02-05-2009 , 02:17 PM
Entropic, thank you very much for sharing this great program with us. It's increased my hourly for sure.

However I'm having issues running the newest version. I'm on Windows Vista.
When I use the following paths I get these messages:

path to logfile "C:\ProgramFiles\PokerStars\PokerStars.log.0" does not exist.

path to logfile "C:\Users\Nick\AppData\Local\Pokerstars\PokerStars .log.0" does not exist.

I'm shipping $10 to you soon as this is working for me again, thank you sir.
NEW Free Software: Stars Debustifier v0.1 (close finished tournaments) Quote
02-05-2009 , 03:13 PM
Thanks Entropic, I'll ship a little cash your way soon.
NEW Free Software: Stars Debustifier v0.1 (close finished tournaments) Quote
02-05-2009 , 05:56 PM
i have no fn clue how to get this to work, i'm getting the error path to logfile doesn't exist.
NEW Free Software: Stars Debustifier v0.1 (close finished tournaments) Quote
02-05-2009 , 07:17 PM
Sorry about the Vista problems, I don't have it so I can't test it. What you guys can do is go to the Search feature in vista and search for the Pokerstars.log.0 file, then put the path to that file in the program and everything should work. Let me know what the path to the file is and I'll update it. Right now it's using

%A_AppData%\Pokerstars\PokerStars.log.0

which should translate to something like
C:\Users\[UserName]\AppData\Local\PokerStars\PokerStars.log.0

But I don't have Vista so it may be translating it as
C:\Users\[UserName]\AppData\PokerStars\PokerStars.log.0

Let me know if you're able to get it working, glad you guys like it.

I'm not sure but Vista's security features may disable access to that file, if none of the above work you could try running the script as admin.
NEW Free Software: Stars Debustifier v0.1 (close finished tournaments) Quote
02-05-2009 , 07:56 PM
Just sent some cash your way too Entropic , i'm only 12 tabling and when it stopped working a few days ago I got very annoyed very fast at having to close tables Thanks for sharing it.
NEW Free Software: Stars Debustifier v0.1 (close finished tournaments) Quote
02-05-2009 , 09:41 PM
thank you!
NEW Free Software: Stars Debustifier v0.1 (close finished tournaments) Quote
02-06-2009 , 01:09 AM
I posted a new thread for the new AHK version. I added the feature CheeseMoney requested to allow a delay before closing a finished tournament. New thread is here:

http://forumserver.twoplustwo.com/45...l-free-406294/
NEW Free Software: Stars Debustifier v0.1 (close finished tournaments) Quote
02-06-2009 , 02:15 PM
The paths to the log file finally work after uninstalling / reinstalling poker stars. thanks again
NEW Free Software: Stars Debustifier v0.1 (close finished tournaments) Quote
02-08-2009 , 03:09 PM
Quote:
Originally Posted by Entropic
I posted a new thread for the new AHK version. I added the feature CheeseMoney requested to allow a delay before closing a finished tournament. New thread is here:

http://forumserver.twoplustwo.com/45...l-free-406294/
Thanks. I pretty much haven't played poker for a month, but I plan to start again, so this should come in handy. This is still such an awesome program. Glad you ported it to ahk (though the original worked fine for me).
NEW Free Software: Stars Debustifier v0.1 (close finished tournaments) Quote
02-10-2009 , 10:28 PM
and i thoght i was goin crzzzyy!
just noticed it hasnt been wokrin for every1...
NEW Free Software: Stars Debustifier v0.1 (close finished tournaments) Quote
12-10-2009 , 08:01 PM
Does this work still?
NEW Free Software: Stars Debustifier v0.1 (close finished tournaments) Quote
12-10-2009 , 08:19 PM
You are bad at using the search feature Latest version is here here, by default it doesn't work with Win7 but there's a fix inside the thread
NEW Free Software: Stars Debustifier v0.1 (close finished tournaments) Quote

      
m