Open Side Menu Go to the Top
Register
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars

02-20-2011 , 01:14 AM
I can't seem to get this to work.

I use windows 7 64 bit professional, and I play on the smallest table size possible, and I use the new black theme.

Installed the PS software on the default folder it suggests during installation, or more specifically on C:Program Files (x86)/etc...

I didn't move any log file, but I did change the folder where the HH's saves at the C:.../Pokerstars/HandHistories.

Any help would be appreciated.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-20-2011 , 01:48 AM
On Win7 I think it writes the log elsewhere, maybe users\appdata or similar. it needs finding, although it may not show up in a search unless you enable an option to search "view hidden files and folders"
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-20-2011 , 03:27 AM
Quote:
Originally Posted by _dave_
On Win7 I think it writes the log elsewhere, maybe users\appdata or similar. it needs finding, although it may not show up in a search unless you enable an option to search "view hidden files and folders"
Ok I enabled the "view hidden files and folders". Cant find it during search though. What am I suppose to type? I tried Pokerstars Log, and it shows nothing.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-20-2011 , 04:09 AM
PokerStars.log.0 is the file. it is constantly being written to while Stars is open. Actually, there may be a link in the help menu of the Stars client to show you the location.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-20-2011 , 11:32 AM
Quote:
Originally Posted by _dave_
PokerStars.log.0 is the file. it is constantly being written to while Stars is open. Actually, there may be a link in the help menu of the Stars client to show you the location.
Typed that on search bar, nothing comes up.

Where in the PS client can I find it? I tried looking but could'nt find it.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-20-2011 , 07:22 PM
click on the 'Help' menu then 'Open My Settings Folder' or something similar
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-20-2011 , 09:02 PM
I found the pokertars log, and I changed the line as indicated above. Still not working though.. Any help?

I use the smallest possible table size and the new black theme.

Here is the script I use
Code:
#NoEnv
#Persistent
SetBatchLines -1


CheckTime := 500   ; Check every n MilliSeconds
sitin_x := 532
sitin_y := 468

timebank_x := 520
timebank_y := 460

_FILE := C . "\Users\Neil\AppData\Local\PokerStars\PokerStars.log.0"
;_FILE := "E:\sitout.txt"
SysGet, border, 32
SysGet, caption, 4
SetTimer, FILE_CHECK, %CheckTime%
return


FILE_CHECK:
If (_NEWLINES := CheckFile(_FILE))
{
  ;msgbox, %_NEWLINES%
  Loop, Parse, _NEWLINES, `n
  {
    if(regExMatch(a_loopfield, "MSG_TABLE_SITTING_STATUS\s(\w{8})\s1", m))
    {
      ;msgbox, %m1%
      PostStarsClick(sitin_x, sitin_y, ("0x" . m1))
      
    }
    else if (regExMatch(a_loopfield, "MSG_TABLE_TIMEBANK\s(\w{8})\stime=", m))
    {
      ;msgbox, %m1%
      PostStarsClick(timebank_x, timebank_y, ("0x" . m1))
    }
  }
;msgbox, %m1%
   
}
Return


CheckFile(File) {
   ; THX Sean for File.ahk : http://www.autohotkey.com/forum/post-124759.html
   Static CF := ""   ; Current File
   Static FP := 0    ; File Pointer
   Static OPEN_EXISTING := 3
   Static GENERIC_READ := 0x80000000
   Static FILE_SHARE_READ := 1
   Static FILE_SHARE_WRITE := 2
   Static FILE_SHARE_DELETE := 4
   Static FILE_BEGIN := 0
   BatchLines := A_BatchLines
   SetBatchLines, -1
   If (File != CF) {
      CF := File
      FP := 0
   }
   hFile := DllCall("CreateFile"
                  , "Str",  File
                  , "Uint", GENERIC_READ
                  , "Uint", FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE
                  , "Uint", 0
                  , "Uint", OPEN_EXISTING
                  , "Uint", 0
                  , "Uint", 0)
   If (!hFile) {
      CF := ""
      FP := 0
      SetBatchLines, %BatchLines%
      Return False
   }
   DllCall("GetFileSizeEx"
         , "Uint",   hFile
         , "Int64P", nSize)
   If (FP = 0 Or nSize <= FP) {
      FP := nSize
      SetBatchLines, %BatchLines%
      DllCall("CloseHandle", "Uint", hFile) ; close file
     Return False
   }
   DllCall("SetFilePointerEx"
         , "Uint",  hFile
         , "Int64", FP
         , "Uint",  0
         , "Uint",  FILE_BEGIN)
   VarSetCapacity(Tail, Length := nSize - FP, 0)
   DllCall("ReadFile"
         , "Uint",  hFile
         , "Str",   Tail
         , "Uint",  Length
         , "UintP", Length
         , "Uint",  0)
   DllCall("CloseHandle", "Uint", hFile)
   VarSetCapacity(Tail, -1)
   FP := nSize
   SetBatchLines, %BatchLines%
   Return Tail
}

relStarsClientPoint(id, ByRef x, ByRef y)
{
  global border
  global caption
  rw := 792
  rh := 546
  WinGetPos, , , w, h, ahk_id%id%
  w := w - (2*border)
  h := h - (2*border) - caption
  
  x := Floor( (x / rw ) * w )
  y := Floor( (y / rh) * h  )
  
}

;Juks rocks
PostLeftClick(x, y, table_id, activate=0) {
; ### JUK: Send the down left click, then the mouse-up messages.
; NOTE: This is relative to the top left of the client area and NOT the top left of the
;       window (ie: It *doesn't* include the title-bar like AHK's MouseClick does!!!).
If activate
 WinActivate, ahk_id%table_id%
PostMessage, 0x201, 0x0001, ((y<<16)^x), , ahk_id%table_id%
PostMessage, 0x202 , 0, ((y<<16)^x), , ahk_id%table_id%
}

PostStarsClick(x, y, id)
{
  relStarsClientPoint(id, x, y)
  PostLeftClick(x, y, id)
}

Last edited by _dave_; 02-20-2011 at 09:15 PM. Reason: CODE tags
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-20-2011 , 09:15 PM
Slight error in editing the _FILE line - it should read:

Code:
_FILE := "C:\Users\Neil\AppData\Local\PokerStars\PokerStars.log.0"
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-21-2011 , 05:24 AM
Add FullTilt support, pls.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-21-2011 , 08:46 AM
Quote:
Originally Posted by _dave_
Slight error in editing the _FILE line - it should read:

Code:
_FILE := "C:\Users\Neil\AppData\Local\PokerStars\PokerStars.log.0"
Thanks dave! I think it's working now. But I'm not really sure though, does it mean it's working when the extra time bank automatically goes off even without a message in the chat that says "myname has requested time" when the initial green time bar runs out?

Sorry for the noob question, just recently started playing at PS this week and not really familiar with the software yet. Played mostly at FT, and there, whenever I request extra time I get the "myname has requested time" message in the chatbox.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-21-2011 , 03:43 PM
easiest way to tell if it's working is to sit out on a table and see if it sits you back in straight away. when it clicks the timebank, it changes to a depressed looking button. if it does that as soon as the timebank button appears, it is working also. not sure if there's a message in chat, I think there is though. Stars will timebank itself if you've got any money in the pot when the green bar runs out so it could be that.

If it's still not working, make sure everything is set to "run as administrator"
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-21-2011 , 06:18 PM
Quote:
Originally Posted by _dave_
easiest way to tell if it's working is to sit out on a table and see if it sits you back in straight away. when it clicks the timebank, it changes to a depressed looking button. if it does that as soon as the timebank button appears, it is working also. not sure if there's a message in chat, I think there is though. Stars will timebank itself if you've got any money in the pot when the green bar runs out so it could be that.

If it's still not working, make sure everything is set to "run as administrator"
Oh I think it's not working then because it doesn't sit me back in when I time out.

How do I run the script as admin? I right click it, but there is not option to run as administrator.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-21-2011 , 07:39 PM
I think there's maybe a "run as admin" button at the top of an folder-view window?

by far the easiest way is to find autohotkey.exe in Program Files and set that to "always run as admin". Same should be done for pokerstars.exe too. possibly hmhud.exe too if you use that.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-22-2011 , 07:05 PM
Does stars not auto activate the timebank anymore?
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-22-2011 , 07:11 PM
only if you're already invested in the pot, iirc it's always been this way.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
03-03-2011 , 05:29 PM
hey dave, i sent you a pm. i just read more posts, i'm not sure now if you said it was easy or difficult now lol.

what i'd like is this. anytime i'm sitting out, to close the table. i dont care about waiting for bb or anything.

i messed around with changing the coordinates but it did nothing. fyi, when i put the coordinates back to original numbers, the autositbackin works perfect.

thanks for any help you can give.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
03-03-2011 , 05:47 PM
Hi,

I meant to post this a while back when SpellOfMaya sent it to me, didn't get round to it yet but here goes.

Spellofmaya / Max1mums edited version:
(will auto-close tables after sit-out next BB - Also will locate correct log folder on vista, possibly win7?)
Code:
 #NoEnv
#Persistent
SetBatchLines -1


CheckTime := 500   ; Check every n MilliSeconds
sitin_x := 532
sitin_y := 468

timebank_x := 520
timebank_y := 460

If A_OSVersion in WIN_VISTA
{
_FILE := A_AppData . "\PokerStars\PokerStars.log.0"
IfNotExist %_FILE%
stringreplace,_FILE,_FILE,Roaming,Local
IfNotExist %_FILE%
{
 msgbox, PokerStars.log.0 file was not found
 return
}
}
else
_FILE := A_ProgramFiles . "\PokerStars\PokerStars.log.0"
;_FILE := "E:\sitout.txt"
SysGet, border, 32
SysGet, caption, 4
SetTimer, FILE_CHECK, %CheckTime%
return


FILE_CHECK:
If (_NEWLINES := CheckFile(_FILE))
{
  ;msgbox, %_NEWLINES%
  Loop, Parse, _NEWLINES, `n
  {
    if(regExMatch(a_loopfield, "MSG_TABLE_FORCE_SITOUT\s(\w{8})\s1", m))
    {
      ;msgbox, %m1%
      ;PostStarsClick(sitin_x, sitin_y, ("0x" . m1))
      id:="0x" . m1
      winclose,ahk_id%id%
      winwait,Table ahk_class #32770,,1
      {
       ControlFocus,Button1,
       Sleep, -1
       ControlSend,Button1,{SPACE},
      }  
    }
    else if (regExMatch(a_loopfield, "MSG_TABLE_TIMEBANK\s(\w{8})\stime=", m))
    {
      ;msgbox, %m1%
      PostStarsClick(timebank_x, timebank_y, ("0x" . m1))
    }
  }
;msgbox, %m1%
   
}
Return


CheckFile(File) {
   ; THX Sean for File.ahk : http://www.autohotkey.com/forum/post-124759.html
   Static CF := ""   ; Current File
   Static FP := 0    ; File Pointer
   Static OPEN_EXISTING := 3
   Static GENERIC_READ := 0x80000000
   Static FILE_SHARE_READ := 1
   Static FILE_SHARE_WRITE := 2
   Static FILE_SHARE_DELETE := 4
   Static FILE_BEGIN := 0
   BatchLines := A_BatchLines
   SetBatchLines, -1
   If (File != CF) {
      CF := File
      FP := 0
   }
   hFile := DllCall("CreateFile"
                  , "Str",  File
                  , "Uint", GENERIC_READ
                  , "Uint", FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE
                  , "Uint", 0
                  , "Uint", OPEN_EXISTING
                  , "Uint", 0
                  , "Uint", 0)
   If (!hFile) {
      CF := ""
      FP := 0
      SetBatchLines, %BatchLines%
      Return False
   }
   DllCall("GetFileSizeEx"
         , "Uint",   hFile
         , "Int64P", nSize)
   If (FP = 0 Or nSize <= FP) {
      FP := nSize
      SetBatchLines, %BatchLines%
      DllCall("CloseHandle", "Uint", hFile) ; close file
     Return False
   }
   DllCall("SetFilePointerEx"
         , "Uint",  hFile
         , "Int64", FP
         , "Uint",  0
         , "Uint",  FILE_BEGIN)
   VarSetCapacity(Tail, Length := nSize - FP, 0)
   DllCall("ReadFile"
         , "Uint",  hFile
         , "Str",   Tail
         , "Uint",  Length
         , "UintP", Length
         , "Uint",  0)
   DllCall("CloseHandle", "Uint", hFile)
   VarSetCapacity(Tail, -1)
   FP := nSize
   SetBatchLines, %BatchLines%
   Return Tail
}

relStarsClientPoint(id, ByRef x, ByRef y)
{
  global border
  global caption
  rw := 792
  rh := 546
  WinGetPos, , , w, h, ahk_id%id%
  w := w - (2*border)
  h := h - (2*border) - caption
  
  x := Floor( (x / rw ) * w )
  y := Floor( (y / rh) * h  )
  
}

;Juks rocks
PostLeftClick(x, y, table_id, activate=0) {
; ### JUK: Send the down left click, then the mouse-up messages.
; NOTE: This is relative to the top left of the client area and NOT the top left of the
;       window (ie: It *doesn't* include the title-bar like AHK's MouseClick does!!!).
If activate
 WinActivate, ahk_id%table_id%
PostMessage, 0x201, 0x0001, ((y<<16)^x), , ahk_id%table_id%
PostMessage, 0x202 , 0, ((y<<16)^x), , ahk_id%table_id%
}

PostStarsClick(x, y, id)
{
  relStarsClientPoint(id, x, y)
  PostLeftClick(x, y, id)
}
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
03-03-2011 , 06:16 PM
hey dave, thanks, but nothing happened with closing a table. i had to change the original script you had to _FILE := "C:\Users\Me\AppData\Local\PokerStars\PokerStars.l og.0"

i suspect i need to make some type of change to this new script?
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
03-03-2011 , 06:30 PM
i also dont see anything in the updated script that closes a table. am i missing something? i'm not very smart with this stuff i guess lol
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
03-03-2011 , 06:31 PM
yeah make the same edit. You're on Win7 right? looks like it's line 25 needs editing in this one.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
03-03-2011 , 06:35 PM
no i have vista, made the exact same change of the log.0 file location but nothing happened. i changed line 15 also. my tables dont close when i'm sitting out. i must be missing something obvious.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
03-03-2011 , 06:38 PM
dont know if this matter, but when i first sit down, and click sit out next hand, the original script sits me back in. this one does not.

i dont know if it should be, if it should be closing the table, if i need to play a hand then have the bb hit me and sit out first, but just thought i'd mention that.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
03-03-2011 , 06:40 PM
worked perfectly, knew it was something stupid, i needed to play first. thanks again as usual!
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
03-03-2011 , 06:46 PM
one thing, can i make it delayed so it doesn't happen instantly? can i make it wait say 10 seconds into the next hand?
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
03-03-2011 , 06:49 PM
found it, nevermind. thanks as always lol
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote

      
m