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

01-17-2012 , 02:03 PM
I expect it works fine on PokerSatrs.fr - you may well need to adjust this line # 12 as it probably installs / writes the log in a different place:
Code:
_FILE := A_ProgramFiles . "\PokerStars\PokerStars.log.0"
There should be no problems running it alongside tableninja, or making two copies of this script with a different _FILE location and running them both for that matter
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
01-19-2012 , 10:22 AM
I tryed this script and cant get it to work... any suggestions?
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-06-2012 , 12:07 PM
I have tried the various hints in this thread and didn't get it to work yet either I'm on Win7 64bit and changed the path to user directory, changed coordinates to those Windows spy gave me for the Nova theme and I tried it with both AHK versions L and classic, no love with any of these combinations I do get some message boxes though when I uncomment these in the code so it has access to the log, must be something else still.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-13-2012 , 06:53 AM
Quote:
Originally Posted by hundenapf
I have tried the various hints in this thread and didn't get it to work yet either I'm on Win7 64bit and changed the path to user directory, changed coordinates to those Windows spy gave me for the Nova theme and I tried it with both AHK versions L and classic, no love with any of these combinations I do get some message boxes though when I uncomment these in the code so it has access to the log, must be something else still.
which coordinates did you change to? be careful that you are using the correct set, there are both relative and screen coordinates
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-15-2012 , 09:07 PM
Quote:
Originally Posted by hundenapf
... changed coordinates to those Windows spy gave me for the Nova theme
numbers of windowspy dont work here either, but by some trial and error i got this numbers, which seems twork fine with NOVA, btw on .fr and .com
Quote:
sitin_x := 640
sitin_y := 505
timebank_x := 510
timebank_y := 460
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-18-2012 , 02:53 AM
is it possible to make AHK script - pot-odds on table for Ipoker and PokerStars?
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-19-2012 , 06:32 AM
Using successfully for nova theme with co-ords (windowspy suggested y co-ords of around 450):

timebank_x := 750
timebank_y := 410
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
02-19-2012 , 10:45 AM
Quote:
Originally Posted by TTR
timebank_x := 510
timebank_y := 460

Quote:
Originally Posted by Redeye00
timebank_x := 750
timebank_y := 410


weird to have them both work with Nova

Last edited by TTR; 02-19-2012 at 10:54 AM.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
03-01-2012 , 01:04 PM
Hi _dave_,

thank you ever so much. Awesome script!!!! Very, very nice!!!

It works perfect. I would like to change it a bit. Unfortunately i am not really skilled with this stuff.

1. Whats my line, if i want no auto sit in? (i mean its cool but not good for a smoking break )

Just delete this part:
Quote:
sitin_x := 532
sitin_y := 468
or is it part of a process/loop???

2. ATM it works only with default-sized table. What i have to edit when i want a bigger window (play stacked). Something to do with this??:
Quote:
global border
global caption
rw := 792
rh := 546
Thanks in advance.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
03-04-2012 , 08:07 AM
Hi,

k, kicking "insta sit back in" was easy ( ";" do the job). But still dont know how to get the script to work with non-default sized tables...
Anyway, thx again for this awesome script

(dont know how to edit my post, sry)
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
03-05-2012 , 09:05 PM
Quote:
Originally Posted by BADABING!
1. Whats my line, if i want no auto sit in? (i mean its cool but not good for a smoking break )



Just delete this part:


or is it part of a process/loop???
i'd rather recommend putting in a hotkey to pause the script.

Code:
^F12::pause
Just put it to the end of the file and whenever you go for a smoke you press ctrl-F12, then sit out on all you tables. When you come back you press ctrl-F12 again and the script will sit you right in


Quote:
2. ATM it works only with default-sized table.
nou, with above numbers you tell the script where to click on default-sized tables and it will calc the numbers for tables of any other sizes


What i have to edit when i want a bigger window (play stacked). Something to do with this??:


Thanks in advance.[/QUOTE]
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
03-07-2012 , 12:18 PM
Hi TTR,

thx for the advice.

Quote:
nou, with above numbers you tell the script where to click on default-sized tables and it will calc the numbers for tables of any other sizes
lol. Without checking it out before, i have used Windowspy to get the coords of the bigger window - certainly it doesnt work
Sometimes it`s just simple as that.
Seems to work now to my liking

Thx again
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
03-08-2012 , 07:32 PM
Dave since we are in same Hu coaching group i know you are great guy (some serious ass kissing itt) would you please make this exact tool for Ipoker?
Pretty please ill pay you up to whole 3 bi's for this! (since we are on same level in coaching branch you know that means a lot of moniez!!)
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
03-20-2012 , 04:35 PM
I copied the scrip maded by Spellofmaya / Max1mums:

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)
}
edited this part:
Code:
sitin_x := 770
sitin_y := 630
Coords proporcioned by windowspy, also edited this part just in case to match siting x,y:

Code:
  rw := 1028
  rh := 736
Still Not working.

Any idea?
Thanks.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
03-20-2012 , 05:24 PM
coords produced by window spy will be wrong. you need coordinates of the client area, that is the window without any of it's borders/captions. the easiest way to get this is to use a screenshot utility that can capture client area (I use an old software paint shop pro 9), or crop a larger screenshot down to size. x/y values are nearly always in client area, since it scales and titlebar/borders do not.

rw and rh specify the original width and height of a client area, this is what the window (client area!) should be sized at when looking for x/y coordinates to click on. they are usually the size of a table when you do not have any layout set, i.e. a default pokerstars table window.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
04-17-2012 , 10:57 AM
Bump. Just found this, fiddling around to see if I can get it to work.

Just wondering, would it be possible to read the log file and every time a new table pops up trigger the hotkey I have to set bet amount to 75% pot? For example, I press F5 which I have set to "activate next table" in Pokerstars own hotkey settings, then a script detects whatever that is written as in the log file (Assuming it is noted) and triggers a hotkey to set bet amount to 75%.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
04-17-2012 , 06:06 PM
Got it working and managed to adapt it to do other useful things too. Great script

Fwiw it worked with the co-ordinates I got from Win32Spy, including the title bar. Do any other poker sites use log files?

Last edited by Yngwie Malmsteen; 04-17-2012 at 06:24 PM.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
04-17-2012 , 09:02 PM
On further review it's not working as I thought it was. The timebank and sit back in features work fine, but if anyone could help me get the following lines from the log file to be detected by the AHK script I would be very grateful

Quote:
HotKey actuated: F6 (Activate Next Table)
HotKey received: 'Activate Next Table' for 00120B06 (4AFBE495), tableClient->hand 6713bdc5
AppModule::getNextTable(), currTable = 04610B20
AppModule::getNextTable(), nextTable = 04610B20
I already tried replacing the following bolded section in the script with various forms of the above to no avail but it just won't recognise when I press the activate next table hotkey

Quote:
if(regExMatch(a_loopfield, "MSG_TABLE_SITTING_STATUS\s(\w{8})\s1", m))

Last edited by Yngwie Malmsteen; 04-17-2012 at 09:07 PM.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
04-17-2012 , 10:03 PM
hard to tell what is the correct 8-digit hex number (hwnd / ahk_id) for the table you want, since there is three in that line! that is what gets stored in the m variable.

something like:
Code:
if(regExMatch(a_loopfield, "\'Activate\sNext\sTable\'\sfor\s(\w{8})\s1", m))
should snag 00120B06 into m, if "'Activate Next Table' for" is present, untested tho! also I'm not certain the ' needs escaping to \' - maybe it's ok just as a single ', or maybe needs "ahk style" escaping as a triple '''
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
05-25-2012 , 01:36 AM
Dos this includ auto "i'm back"?
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
05-25-2012 , 01:48 AM
yes, unless it's there because you ticked "sit out next bb"
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
07-20-2012 , 11:59 AM
I just migrated to the .eu client and just (while firing up tables, ldo) noticed the script doesn't work any more!? I need a quick fix plz!

TIA

edit: didn't change any table/button coords etc, slick theme, winXP
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
07-20-2012 , 01:05 PM
most likely it's just putting it's log file in a slightly different place?
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
07-20-2012 , 02:00 PM
I don't think so, PokerStars.log.0 is in the same place as before, the main PokerStars folder...
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
07-20-2012 , 02:16 PM
but it will be in program files\pokerstars.eu\ or something new now, no?
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote

      
m