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

07-09-2014 , 05:32 PM
Quote:
Originally Posted by Max1mums
Code:
\s\w{8}\s(\w{8})", m)
has to be replaced with
Code:
\s\w{10}\s(\w{8})", m)
Thanks Max1mums. I tested it quickly and Timebank is pressed. However, it doesn't seem to press the "I'm back" button...
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
07-09-2014 , 06:08 PM
Aura23, there were several lines to replace with that pattern; you can get the edited version here http://****************/projects/ftca...2.ahk/download
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
07-09-2014 , 06:51 PM
I was pretty sure I replaced all 3 lines. Anyway, I downloaded your version and all works fine now so either it was an isolated incident or I did something wrong in my update. Thanks for writing and supporting this. I am sure it must feel unrewarding sometimes.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
07-10-2014 , 01:11 PM
I use this since few months. Works perfectly. Thanks a lot!
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
07-18-2014 , 03:36 AM
I m not familiar at allwith AHK script but i really would like to learn as i found this script verry usefull, any sticky or post you can point me to?
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
07-23-2014 , 09:41 PM
hi!
its use to work but now it doesnt
i have a laptop with windows vista and in ps i use the hyper-simple theme for the tables
anyone know what i have to change?
many tks!


here is the "auto time bank.ahk":

#NoEnv
#Persistent
SetBatchLines -1


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

timebank_x := 520
timebank_y := 460

_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_0x000A-T\s\w{8}\s(\w{8})\s", m))
{
;msgbox, %m1%
PostStarsClick(sitin_x, sitin_y, ("0x" . m1))

}
else if (regExMatch(a_loopfield, "MSG_0x0023-T\s\w{8}\s(\w{8})", 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
07-26-2014 , 09:35 PM
Its been a long time since i want to put the auto time bank option (Why dont Stars has it as default?)

I have no idea what to do, i need some help. Where does i suppose to copy/past the op?

Any help would be appreciate
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
07-29-2014 , 12:40 PM
hi
i download the "timebankstars1.02b" but it doesnt work, i run it as administrator with windows vista with the hyper-simple theme
what have i change in the script?
tks
regards
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
07-30-2014 , 05:17 AM
Quote:
Originally Posted by skywalker1
hi!
its use to work but now it doesnt
i have a laptop with windows vista and in ps i use the hyper-simple theme for the tables
anyone know what i have to change?
many tks!


here is the "auto time bank.ahk":

#NoEnv
#Persistent
SetBatchLines -1


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

timebank_x := 520
timebank_y := 460

_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_0x000A-T\s\w{8}\s(\w{8})\s", m))
{
;msgbox, %m1%
PostStarsClick(sitin_x, sitin_y, ("0x" . m1))

}
else if (regExMatch(a_loopfield, "MSG_0x0023-T\s\w{8}\s(\w{8})", 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)
}

else if (regExMatch(a_loopfield, "MSG_0x0023-T\s\w{8}\s(\w{8})", m))
{
;msgbox, %m1%
PostStarsClick(timebank_x, timebank_y, ("0x" . m1))
}

You should cut the zeros from the beggining of the %m1%.
Sometimes its like 00547AC5, but u need only the 547AC5 part (0x547AC5 will be the table ID)
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
08-01-2014 , 05:32 PM
timebankstars1.02b

since the latest ps update this has stopped working. tried using the pixel option also without any luck.

any idea's why ? thanks
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
08-04-2014 , 05:55 PM
I was wondering if anyone could please help me out.
i had this program working for sometime np's.

until latest Ps update.

i have a mod on the Azure skin , but when i come to config using pixel mode.
i wrap the box around the I'm back button and save.
but the coordinates don't change, also it will not work once i reload.

any idea's thanks for reading .

New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
08-04-2014 , 07:14 PM
Bertz, did you press the "Save" button after wraping the configuration box? Confirmation window should appear with the click point visible on the captured image. 1.02b is not the latest version, check my last posts in this thread for the link/changes to be made. Run the script as admin.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
08-05-2014 , 10:37 AM
Hi max
yes I clicked the save it's the little box below the table with the pointer image, just to confirm the pointer is in the correct place.

Ok will follow your advice about link/changes and see how it goes.

Thanks for the help
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
08-05-2014 , 12:03 PM
I see, you can try reconfiguring it leaving some space around the button so that the click point is on the button background.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
08-11-2014 , 07:15 AM
Hmm my script stopped working after the latest update too. Anyone got a working version or have any idea how to fix it?

Also can someone explain what PS does with updates that messes the script up? I thought it was just a pixel reading program and don't see any changes?
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
08-25-2014 , 01:31 AM
How to force script to work with PS7 Mecrury theme? With log.0 file. I solved a problem with previous link (to 1.02 version, not b) and pixel reading method but appears problems with drag tables and notes. Seems soft preventing my actions with clicking left mouse button.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
08-26-2014 , 01:36 PM
+1 stopped working (1.02b)
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
08-26-2014 , 04:02 PM
1.02b is not the latest version, http://****************/projects/ftca...2.ahk/download
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
08-26-2014 , 07:31 PM
Ty, works good again.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
09-12-2014 , 02:52 AM
Thanks for the script

I use this script and now facing some serious problem
[PHP]
Spoiler:

; #### StarsTimebank ####

; AHK version: 1.0.48.05
; date: May 19,2013
version := "1.01"
; author: Max1mums (max1mums@overcards.com)

#SingleInstance, Force
#NoEnv
Settitlematchmode, 2
OnExit exitSub

StringTrimRight, thisahk, A_ScriptName, 4
SetWorkingDir %A_ScriptDir%
StringReplace,AhkVersion,A_AhkVersion,.,,All

Menu, Tray, NoStandard
Menu, Tray, Add, Gui, menugui
Menu, Tray, Add
Menu, Tray, Add, Reload, reload
Menu, Tray, Default, Gui
Menu, Tray, Add
Menu, Tray, Add, Edit, Edit
Menu, Tray, Add
Menu, Tray, Add, Exit, ExitSub

OnMessage(0x112,"WM_SYSCOMMAND")
WM_SYSCOMMAND(wParam)
{
if (A_Gui && wParam = 0xF020) ; SC_MINIMIZE
{
Gui, destroy
return 0
}
}

OnMessage(0x201, "drag")

SetBatchLines,1ms
SetWinDelay,-1

SysGet, xbord, 32
SysGet, ybord, 33
SysGet, cap, 4


tablequeue=
ddlist=
ddlist:=ddlist . "Off" . "|"
Loop 14
ddlist:=ddlist . A_index . "|"

DllCall("dwmapi\DwmIsCompositionEnabled","int*",Dw mIsEnabled)

gosub,getini

CheckTime_file:=800 ; Check every n MilliSeconds
CheckTime_pixel:=877
DealinClick_delay:=700

;;;;;;;;;;;;;;End of init;;;;;;;;;;;;;;
settimer,clickwithdelay,133
settimer,dwmcheck,342
if use_file
{
if !instr(location,"not found")>0
SetTimer, FILE_CHECK, %CheckTime_file%
}
else
{
settimer,ClickTimebank,%CheckTime_pixel%
if dealin
settimer,Clickimback,1563
else
settimer,Clickimback,off
}

return
;-----------------------------------------------------------------------------------------------------
dwmcheck:
DllCall("dwmapi\DwmIsCompositionEnabled","int*",Dw m)
if !(dwm=DwmIsEnabled)
gosub,reload
return
;-----------------------------------------------------------------------------------------------------
listAdd( byRef list, item, del="," ) {
list:=( list!="" ? ( list . del . item ) : item )
return list
}
;-----------------------------------------------------------------------------------------------------
listDelItem( byRef list, item, del=",") {
ifEqual, item,, return list
list:=del . list . del
StringReplace, list, list, %del%%item%%del%,%del%,All
StringTrimLeft, list, list, 1
StringTrimRight, list, list, 1
return list
}
;-----------------------------------------------------------------------------------------------------
clickwithdelay:
interval:=interval1*1000
Loop, Parse, tablequeue, `,
{
if !A_loopfield
continue
stringsplit,tab,A_loopfield,-
if (abs(tab2-A_TickCount)>interval)
ifwinnotexist,ConfigWindow ahk_class AutoHotkeyGUI
{
PostClickStars(tab3, tab4, tab1, 0)
listDelItem(tablequeue, A_Loopfield)
}
}
Loop, Parse, tablequeue_dealin, `,
{
if !A_loopfield
continue
stringsplit,tab,A_loopfield,-
if (abs(tab2-A_TickCount)>DealinClick_delay)
ifwinnotexist,ConfigWindow ahk_class AutoHotkeyGUI
{
PostClickStars(tab3, tab4, tab1, 0)
listDelItem(tablequeue_dealin, A_Loopfield)
}
}
return
;-----------------------------------------------------------------------------------------------------
relStarsClientPoint(id, ByRef x, ByRef y, client=1,screen=0)
{
global xbord,ybord,cap
WinGetPos,x1,y1,w,h,ahk_id%id%
w-=2*xbord
h-=(2*ybord)+cap
x:=floor(W*x)
y:=floor(H*y)
if !client
{
x+=xbord
y+=ybord+cap
}
if screen
{
x+=x1
y+=y1
}
}
return
;-----------------------------------------------------------------------------------------------------
PostLeftClick(x, y, table_id, activate=1, control_class="") {
; ### 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%
critical,6
PostMessage, 0x201, 0x0001, ((y<<16)^x), %control_class%, ahk_id%table_id%
PostMessage, 0x202 , 0, ((y<<16)^x), %control_class%, ahk_id%table_id%
critical,off
sleep,-1
}
return
;-----------------------------------------------------------------------------------------------------
PostclickStars(x,y,winid,activate=1,client=1)
{
relStarsClientPoint(winid, x, y,client)
DllCall("SetCapture","Uint",winid)
PostLeftClick(x, y, winid, activate)
DllCall("ReleaseCapture")
}
return
;-----------------------------------------------------------------------------------------------------
PixelColorA(colx,coly,id,region=0,regiondim=5)
{
global xbord,ybord,cap,DwmIsEnabled
WinGetPos,,,W,H,ahk_id %id%
if DwmIsEnabled
hdc_buffer := DllCall("GetDCEx", "UInt", id,"UInt",0,"UInt",1)
else
{
hdc_frame := DllCall( "GetDC", "UInt",0)
hdc_buffer := DllCall("gdi32.dll\CreateCompatibleDC","UInt",hdc_ frame)
hbm_buffer := DllCall("gdi32.dll\CreateCompatibleBitmap", "UInt",hdc_frame, "Int",w, "Int",h)
DllCall( "gdi32.dll\SelectObject", "UInt",hdc_buffer, "UInt",hbm_buffer)
DllCall( "PrintWindow", "UInt" , id , "UInt" , hdc_buffer , "UInt" , 0 )
WinGet,ctrls,ControlList,ahk_id %id%
Loop,Parse,ctrls,`n
{
class:=A_LoopField
ControlGet,ctrlid,Hwnd,,%class%,ahk_id %id%
ControlGet,visible,Visible,,,ahk_id %ctrlid%
If visible=1
DllCall("RedrawWindow","UInt",ctrlid,"UInt",0,"UIn t",0,"UInt", 1|4|64|1024)
}
DllCall("RedrawWindow","UInt",id,"UInt",0,"UInt",0 ,"UInt", 1|4|64|1024)
}
x:=floor(((W-2*xbord)*colx)) + xbord
y:=floor(((H-(2*ybord)-cap)*coly)) + ybord + cap
if region
{
loop %regiondim%
{
delta:=A_index
loop %regiondim%
{
delta1:=A_index
p := DllCall("GetPixel", "UInt", hdc_buffer, "Int", x+delta , "Int", y+delta1)
;SetFormat, IntegerFast, hex
;p += 0
;p .= ""
;SetFormat, IntegerFast, d
pix.=p . "-"
}
}
}
else
{
pix := DllCall("GetPixel", "UInt", hdc_buffer, "Int", x, "Int", y)
SetFormat, IntegerFast, hex
pix += 0
pix .= ""
SetFormat, IntegerFast, d
}
;sleep,1

DllCall( "gdi32.dll\DeleteObject","Uint",hbm_buffer)
DllCall( "gdi32.dll\ReleaseDC","Uint",hdc_buffer)
DllCall( "gdi32.dll\DeleteDC","Uint",hdc_buffer)
DllCall( "gdi32.dll\ReleaseDC","Uint",hdc_frame)
DllCall( "gdi32.dll\DeleteDC","Uint",hdc_frame)
return pix
}
;-----------------------------------------------------------------------------------------------------
CompareColors(ByRef bgr1, ByRef bgr2, ByRef variation) {
c1 := bgr1 & 0xff
c2 := bgr2 & 0xff
if (abs(c1 - c2) > variation)
return false
c1 := (bgr1 >> 8) & 0xff
c2 := (bgr2 >> 8) & 0xff
if (abs(c1 - c2) > variation)
return false
c1 := (bgr1 >> 16) & 0xff
c2 := (bgr2 >> 16) & 0xff
if (abs(c1 - c2) > variation)
return false
return true
}
;-----------------------------------------------------------------------------------------------------
ClickTimebank:
clicktime()
return
;-----------------------------------------------------------------------------------------------------
clicktime()
{
Local list,id,col,check,color,x,y,color
winget,list,list,Logged In ahk_class PokerStarsTableFrameClass
if defpos_pixel
{
x:=%Theme%_timebank_x
y:=%Theme%_timebank_y
color:=%Theme%_timebank_color
}
else
{
x:=custompos_pixel_x
y:=custompos_pixel_y
color:=custom_color
}
v:=3
loop %list%
{
id:=list%A_index%
col:=PixelColorA(x-0.003,y-0.003,id,1)
;fileappend,%color%-%col%`n, test.txt
check:=0
Loop, Parse, col, -,
{
if !A_loopfield
continue
color1:=A_loopfield
if CompareColors(color1, color, v)=1
{
if !InStr(tablequeue,id)
listAdd(tablequeue,id . "-" . A_TickCount . "-" . x . "-" . y)
check:=1
break
}
}
if !check
if InStr(tablequeue,id)
listDelItem(tablequeue,id)
}
}
return
;-----------------------------------------------------------------------------------------------------
Clickimback:
clickimback()
return
;-----------------------------------------------------------------------------------------------------
clickimback()
{
Local list,id,col,color,x,y,color
winget,list,list,Logged In ahk_class PokerStarsTableFrameClass
if defpos_pixel_dealin
{
x:=%Theme%_imback_x
y:=%Theme%_imback_y
color:=%Theme%_imback_color
}
else
{
x:=custompos_pixel_dealin_x
y:=custompos_pixel_dealin_y
color:=custom_color_dealin
}
v:=3
loop %list%
{
id:=list%A_index%
col:=PixelColorA(x-0.003,y-0.003,id,1)
Loop, Parse, col, -,
{
if !A_loopfield
continue
color1:=A_loopfield
if CompareColors(color1, color, v)=1
{
ifwinnotexist,ConfigWindow ahk_class AutoHotkeyGUI
PostClickStars(x,y,id,0)
break
}
}
}
}
return
;-----------------------------------------------------------------------------------------------------
FILE_CHECK:
If (_NEWLINES := CheckFile(location))
{
if defpos_file
{
timebank_x:=%Theme%_timebank_x
timebank_y:=%Theme%_timebank_y
sitin_x:=%Theme%_imback_x
sitin_y:=%Theme%_imback_y
}
else
{
timebank_x:=custompos_file_x
timebank_y:=custompos_file_y
sitin_x:=custompos_file_dealin_x
sitin_y:=custompos_file_dealin_y
}
;msgbox, %_NEWLINES%
Loop, Parse, _NEWLINES, `n
{
if (regExMatch(a_loopfield, "MSG_0x0023-T\s\w{10}\s(\w{8})", m))
{
;msgbox, %m1%
;PostclickStars(timebank_x, timebank_y, ("0x" . m1))
if !InStr(tablequeue,("0x" . m1))
listAdd(tablequeue,("0x" . m1) . "-" . A_TickCount . "-" . timebank_x . "-" . timebank_y)
}
else
if (regExMatch(a_loopfield, "MSG_0x000A-T\s\w{10}\s(\w{8})\s", m))
{
;msgbox, %m1%
ifwinnotexist,ConfigWindow ahk_class AutoHotkeyGUI
if !InStr(tablequeue_dealin,("0x" . m1))
listAdd(tablequeue_dealin,("0x" . m1) . "-" . A_TickCount . "-" . sitin_x . "-" . sitin_y)
;PostclickStars(sitin_x, sitin_y, ("0x" . m1))
}
}
;msgbox, %m1%

}
Return


CheckFile(File) {
global AhkVersion
; 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)
ReplaceByte( &Tail, Length)
VarSetCapacity(Tail, -1)
FP := nSize
if (AhkVersion>104805) && !(instr(tail,"MSG")>0)
tail:=Ansi2Unicode(tail)
SetBatchLines, %BatchLines%
Return Tail
}

Ansi2Unicode(sString, CP = 0)
{
nSize := DllCall("MultiByteToWideChar"
, "Uint", CP
, "Uint", 0
, "Uint", &sString
, "int", -1
, "Uint", 0
, "int", 0)

VarSetCapacity(wString, nSize * 2)

DllCall("MultiByteToWideChar"
, "Uint", CP
, "Uint", 0
, "Uint", &sString
, "int", -1
, "Uint", &wString
, "int", nSize)
return wstring
}

ReplaceByte( hayStackAddr, hayStackSize, ByteFrom=0, ByteTo=1, StartOffset=0, NumReps=-1)
{ Static fun
IfEqual,fun,
{
h=
( LTrim join
5589E553515256579C8B4D0C8B451831D229C17E25837D1C00 741F8B7D0801C70FB6451
00FB65D14FCF2AE750D885FFF42FF4D1C740409C975EF9D89D 05F5E5A595BC9C21800
)
VarSetCapacity(fun,StrLen(h)//2)
Loop % StrLen(h)//2
NumPut("0x" . SubStr(h,2*A_Index-1,2), fun, A_Index-1, "Char")
}
Return DllCall(&fun
, "uint",haystackAddr, "uint",hayStackSize, "short",ByteFrom, "short",ByteTo
, "uint",StartOffset, "int",NumReps)
}

FlipBlueAndRed(c) ; takes RGB or BGR and swaps the R and B
{
return (c&255)<<16 | (c&65280) | (c>>16)
}

DecToHex(dec)
{
oldfrmt := A_FormatInteger
hex := dec
SetFormat, IntegerFast, hex
hex += 0
hex .= ""
SetFormat, IntegerFast, %oldfrmt%
return hex
}

config:
config()
return

save_config_file:
save(1)
return

save_config_file_dealin:
save(2)
return

save_config_pixel:
save(3)
return

save_config_pixel_dealin:
save(4)
return

method:
gui,Submit,nohide
ctrl=file
loop 2
{
state:=(use_%ctrl%=0) ? "Disable" : "Enable"
GuiControl, %state%, %ctrl%Txt
GuiControl, %state%, %ctrl%Txt3
GuiControl, %state%, %ctrl%Txt4
GuiControl, %state%, %ctrl%Txt5
GuiControl, %state%, defpos_%ctrl%
GuiControl, %state%, custompos_%ctrl%
if (ctrl="file")
{
state:=(use_%ctrl%=0) ? "Disable" : "Enable"
GuiControl, %state%, customlocation
GuiControl, %state%, Select
}
state:=(use_%ctrl%=0) ? "Disable" : (custompos_%ctrl%=0) ? "Disable" : "Enable"
GuiControl, %state%, %ctrl%btn1
state:=(use_%ctrl%=0) ? "Disable" : (dealin=0) ? "Disable" : "Enable"
GuiControl, %state%, defpos_%ctrl%_dealin
GuiControl, %state%, custompos_%ctrl%_dealin
state:=(use_%ctrl%=0) ? "Disable" : (dealin=0) ? "Disable" : (custompos_%ctrl%_dealin) ? "Enable" : "Disable"
GuiControl, %state%, %ctrl%btn1_dealin
GuiControl, %state%, %ctrl%Txt6
GuiControl, %state%, %ctrl%Txt1
GuiControl, %state%, %ctrl%Txt2
GuiControl, %state%, %ctrl%Txt7
ctrl=pixel
}
return


submitsettings:
gui,Submit,nohide
FileDelete, %thisahk%.ini
gosub,MakeIni
gosub,getini
GuiControl, +background%Currentcolor%, Currentcolor
GuiControl, +background%Currentcolor_dealin%, Currentcolor_dealin
GuiControl, Text, pixelTxt4, %Currentcolorbgr%
GuiControl, Text, pixelTxt6, %Currentcolorbgr_dealin%
GuiControl, Text, filetxt5, Current location: %currentpos_file_x%/%currentpos_file_y%
GuiControl, Text, filetxt1, Current location: %currentpos_file_dealin_x%/%currentpos_file_dealin_y%
ctrl=file
loop 2
{
state:=(use_%ctrl%=0) ? "Disable" : (dealin=0) ? "Disable" : (custompos_%ctrl%_dealin=0) ? "Disable" : "Enable"
GuiControl, %state%, %ctrl%btn1_dealin
GuiControl, %state%, %ctrl%Txt2
state:=(use_%ctrl%=0) ? "Disable" : (custompos_%ctrl%=0) ? "Disable" : "Enable"
GuiControl, %state%, %ctrl%Txt7
GuiControl, %state%, %ctrl%btn1
ctrl=pixel
}
return

dealinsettings:
gui,Submit,nohide
state:=(dealin=0) ? "Disable" : (use_pixel=0) ? "Disable" : "Enable"
GuiControl, %state%, Currentcolor_dealin
GuiControl, %state%, pixelTxt6
ctrl=file
loop 2
{
state:=(use_%ctrl%=0) ? "Disable" : (dealin=0) ? "Disable" : "Enable"
GuiControl, %state%, %ctrl%Txt1
GuiControl, %state%, defpos_%ctrl%_dealin
GuiControl, %state%, custompos_%ctrl%_dealin
state:=(use_%ctrl%=0) ? "Disable" : (dealin=0) ? "Disable" : (custompos_%ctrl%_dealin) ? "Enable" : "Disable"
GuiControl, %state%, %ctrl%btn1_dealin
GuiControl, %state%, %ctrl%Txt2
ctrl=pixel
}
return

drag()
{
ifwinactive,ConfigWindow ahk_class AutoHotkeyGUI
PostMessage, 0xA1, 2
}
return

config()
{
global xbord,cap
winclose,Test ahk_class AutoHotkeyGUI
ifwinexist,ConfigWindow ahk_class AutoHotkeyGUI
return
ctrl=file
loop 2
{
if instr(A_guicontrol,ctrl)
{
if instr(A_guicontrol,"dealin")
GuiControl, Enable, %ctrl%btn2_dealin
else
GuiControl, Enable, %ctrl%btn2
}
ctrl=pixel
}
;CustomColor = EEAA99
CustomColor = 000000
Gui,2: +Alwaysontop -Caption +Resize
Gui,2: Color, %CustomColor%
Gui,2: show, w100 h60, ConfigWindow
;WinSet, TransColor, %CustomColor%, ConfigWindow
WinSet, Transparent ,125,ConfigWindow
}
return

Confirm:
confirmed:=1
Gui,3:destroy
return

Cancel1:
3guiclose:
Gui,3:destroy
confirmed:=0
return

save(mode)
{
global xbord,ybord,cap,confirmed,thisahk
winget,id,id,ahk_class PokerStarsTableFrameClass
wingetpos,x,y,w,h,ahk_id %id%
wingetpos,x1,y1,w1,h1,ConfigWindow
getlength:=w1-2*xbord
getheight:=h1-2*ybord
;Gui,3: Show, w%getlength% h%getheight%, Test
Gui,3: Show, w300 h300, Test
WinGet,TestID, id, Test ahk_class AutoHotkeyGUI
hdc_frame := DllCall("GetDC", UInt, TestID)
hdc_buffer := DllCall("gdi32.dll\CreateCompatibleDC", UInt, hdc_frame)
hbm_buffer := DllCall("gdi32.dll\CreateCompatibleBitmap", UInt,hdc_frame, Int,w, Int,h)
DllCall( "gdi32.dll\SelectObject", UInt,hdc_buffer, UInt,hbm_buffer)
DllCall( "PrintWindow", UInt , id , UInt , hdc_buffer , UInt , 0 )
startx:=x1-x+xbord
starty:=y1-y+ybord
targetx:=Round((startx+Round(getlength/4)-xbord)/(w - (2*xbord)),5)
targety:=Round((starty+Round(getheight/3)-ybord - cap)/(h - (2*ybord) - cap),5)
x:=floor(((W-2*xbord)*targetx)) + xbord
y:=floor(((H-(2*ybord)-cap)*targety)) + ybord + cap
targetp := DllCall("GetPixel", "UInt", hdc_buffer, "Int", x , "Int", y)
SetFormat, IntegerFast, hex
targetp += 0
targetp .= ""
SetFormat, IntegerFast, d
loop 5
{
loop 5
DllCall("SetPixel", "uint", hdc_buffer, "int", x+A_index, "int", y, "uint", 0xFFFFFF)
y++
}
x:=(getlength<200) ? Round((200-getlength)/2) : 10
y:=10
DllCall("gdi32.dll\BitBlt" , UInt,hdc_frame, Int, x, Int, y, Int, getlength, Int, getheight, UInt,hdc_buffer, Int, startx, Int, starty, UInt, 0xCC0020)

WinGet,ctrls,ControlList,ahk_id %id%
Loop,Parse,ctrls,`n
{
class:=A_LoopField
ControlGet,ctrlid,Hwnd,,%class%,ahk_id %id%
ControlGet,visible,Visible,,,ahk_id %ctrlid%
If visible=1
DllCall("RedrawWindow","UInt",ctrlid,"UInt",0,"UIn t",0,"UInt", 1|4|64|1024)
}
DllCall("RedrawWindow","UInt",id,"UInt",0,"UInt",0 ,"UInt", 1|4|64|1024)
DllCall( "gdi32.dll\DeleteObject", "uint", hbm_buffer )
DllCall( "gdi32.dll\ReleaseDC" , "uint", hdc_frame )
DllCall( "gdi32.dll\DeleteDC" , "uint", hdc_frame )
DllCall( "gdi32.dll\DeleteDC" , "uint", hdc_buffer )
y:=getheight+20
Gui,3: Add, text, x6 y%y% ,Has the button been captured correctly?
y+=20
Gui,3: Add, Button, x26 y%y% w65 h20 gconfirm, Confirm
Gui,3: Add, Button, x106 y%y% w65 h20 gCancel1, Cancel
h:=y+30
w:=(w1<200) ? 200 : w1+20
Gui,3: Show, w%w% h%h%, Test
gui,2:destroy
ctrl=file
loop 2
{
GuiControl, Disable, %ctrl%btn2_dealin
GuiControl, Disable, %ctrl%btn2
ctrl=pixel
}
confirmed=
loop
{
if confirmed=1
{
if mode=1
{
IniWrite, %targetx%, %thisahk%.ini, Options, custompos_file_x
IniWrite, %targety%, %thisahk%.ini, Options, custompos_file_y
}
else
if mode=2
{
IniWrite, %targetx%, %thisahk%.ini, Options, custompos_file_dealin_x
IniWrite, %targety%, %thisahk%.ini, Options, custompos_file_dealin_y
}
else
if mode=3
{
IniWrite, %targetx%, %thisahk%.ini, Options, custompos_pixel_x
IniWrite, %targety%, %thisahk%.ini, Options, custompos_pixel_y
IniWrite, %targetp%, %thisahk%.ini, Options, custom_color
}
else
if mode=4
{
IniWrite, %targetx%, %thisahk%.ini, Options, custompos_pixel_dealin_x
IniWrite, %targety%, %thisahk%.ini, Options, custompos_pixel_dealin_y
IniWrite, %targetp%, %thisahk%.ini, Options, custompos_color_dealin
}
confirmed=
gui,Submit,nohide
gosub,getini
gosub,submitsettings
break
}
else
if confirmed=0
break
}

}
return

detect:
location=
Loop, %A_ProgramFiles%\* , 2
{
if instr(A_LoopFileName,"PokerStars")>0
location:=A_LoopFileFullPath . "\PokerStars.log.0"
}
IfNotExist %location%
Loop, %A_AppData%\* , 2
if instr(A_LoopFileName,"PokerStars")>0
location:=A_LoopFileFullPath . "\PokerStars.log.0"
IfNotExist %location%
{
StringReplace,location,A_AppData,Roaming,Local
Loop, %location%\* , 2
if instr(A_LoopFileName,"PokerStars")>0
location:=A_LoopFileFullPath . "\PokerStars.log.0"
}
IfNotExist %location%
location:="PokerStars.log.0 file was not found!"
return

Selectfile:
gui,Submit,nohide
if !customlocation
{
FileSelectFolder,folder,,2,Select the folder with the PokerStars.log.0 file, type/paste the path into the edit field alternatively
Folder := RegExReplace(Folder, "\\$")
}
else
{
StringReplace,Folder,customlocation,\PokerStars.lo g.0,
Folder := RegExReplace(Folder, "\\$")
}
IfNotExist,%Folder%\PokerStars.log.0
gosub,confirmdialog
else
{
location:=Folder . "\PokerStars.log.0"
IniWrite, %location%, %thisahk%.ini, Settings, location
customlocation:=Folder . "\PokerStars.log.0"
IniWrite, %customlocation%, %thisahk%.ini, Settings, customlocation
GuiControl,Text,customlocation,%customlocation%
GuiControl,Text,fileTxt3,Pokerstars.log.0 file location:%location%
}
fontcolor:=(instr(location,"not found")>0) ? "red" : (FileExist(location)) ? "green" : "red"
gui,font,c%fontcolor%
GuiControl,font,fileTxt3
return

confirmdialog:
MsgBox, 4,, PokerStars.log.0 was not found in the selected folder, continue anyway?
IfMsgBox Yes
{
if !Folder
return
location:=Folder . "\PokerStars.log.0"
IniWrite, %location%, %thisahk%.ini, Settings, location
customlocation:=Folder . "\PokerStars.log.0"
IniWrite, %customlocation%, %thisahk%.ini, Settings, customlocation
GuiControl,Text,customlocation,%customlocation%
GuiControl,Text,fileTxt3,Pokerstars.log.0 file location:%location%
gui,font,c%fontcolor%
GuiControl,font,fileTxt3
}
else
{
customlocation=
GuiControl,Text,customlocation,%customlocation%
gosub,Selectfile
}
return


BuildGui:
Gui, color, white
Gui, add, tab, h730 w506, General
Gui, Tab, General

Gui, Add, Radio, x26 y50 w280 h20 Checked%use_file% vuse_file gmethod, Use Pokerstars.log.0 file reading method (default)
Gui, Add, Radio, x26 y70 w280 h20 Checked%use_pixel% vuse_pixel gmethod, Use pixel reading method
Gui, add, Text, w200 y110 x26, Time delay for pressing the Time button
Gui, add, DropDownList, w40 y105 x215 vInterval1, %ddlist%
Gui, add, Checkbox, y150 x26 Checked%dealin% Vdealin gdealinsettings, Press I'm back button additionally
Gui, add, text, x26 y170 ,(excluding intentional Sitout using the file read, including for the pixel read)
Gui, add, text, x366 y50 cred ,Select the table theme
Gui, Add, Radio, x366 y70 w130 h20 Checked%ClassicTheme% vClassicTheme gsubmitsettings, Classic Theme
Gui, Add, Radio, x366 y90 w130 h20 Checked%HyperSimpleTheme% vHyperSimpleTheme gsubmitsettings, HyperSimple Theme
Gui, Add, Radio, x366 y110 w130 h20 Checked%BlackTheme% vBlackTheme gsubmitsettings, Black Theme
Gui, Add, Radio, x366 y130 w130 h20 Checked%SlickTheme% vSlickTheme gsubmitsettings, Slick Theme
Gui, Add, Radio, x366 y150 w130 h20 Checked%NovaTheme% vNovaTheme gsubmitsettings, Nova Theme
Gui, add, text, x26 y210 cred Disabled%use_pixel% vfileTxt,File reading method configuration
Gui, add, text, x26 y230 w480 c%fontcolor% Disabled%use_pixel% vfileTxt3,Pokerstars.log.0 file location: %location%
Gui, add, text, x26 y250 Disabled%use_pixel% vfileTxt4,Custom location
Gui, Add, Edit, x126 y250 w300 h20 vcustomlocation Disabled%use_pixel%, %customlocation%
Gui, Add, Button, x435 y250 w65 h20 gSelectfile Disabled%use_pixel% vSelect,Select
Gui, Add, Radio, x26 y290 w280 h20 Disabled%use_pixel% Checked%defpos_file% vdefpos_file gsubmitsettings, Use Theme default Timebank button location
Gui, Add, Radio, x26 y310 w280 h20 Disabled%use_pixel% Checked%custompos_file% vcustompos_file gsubmitsettings, Use custom Timebank button location
Gui, add, text, x316 y300 w180 cred Disabled%use_pixel% vfileTxt5,Current location: %currentpos_file_x%/%currentpos_file_y%
Gui, Add, Button, x26 y330 w65 h20 %customfilestate% gconfig vfilebtn1,Configure
Gui, Add, Button, x106 y330 w65 h20 Disabled gsave_config_file vfilebtn2,Save
Gui, add, text, x206 y330 %customfilestate% vfileTxt7,(wrap the window around the Timebank button and press save)

Gui, Add, Radio, x26 y370 w280 h20 %filedealinstate% Checked%defpos_file_dealin% vdefpos_file_dealin gsubmitsettings, Use Theme default Imback button location
Gui, Add, Radio, x26 y390 w280 h20 %filedealinstate% Checked%custompos_file_dealin% vcustompos_file_dealin gsubmitsettings, Use custom Imback button location
Gui, add, text, x316 y380 w180 cred %filedealinstate% vfileTxt1,Current location: %currentpos_file_dealin_x%/%currentpos_file_dealin_y%
Gui, Add, Button, x26 y410 w65 h20 %customfilestate_dealin% gconfig vfilebtn1_dealin,Configure
Gui, Add, Button, x106 y410 w65 h20 Disabled gsave_config_file_dealin vfilebtn2_dealin,Save
Gui, add, text, x206 y410 %customfilestate_dealin% vfileTxt2,(wrap the window around the Imback button and press save)


Gui, add, text, x26 y470 cred Disabled%use_file% vpixelTxt,Pixel reading method configuration
Gui, Add, Radio, x26 y490 w280 h20 Disabled%use_file% Checked%defpos_pixel% gsubmitsettings vdefpos_pixel, Use Theme default Timebank button color
Gui, Add, Radio, x26 y510 w280 h20 Disabled%use_file% Checked%custompos_pixel% gsubmitsettings vcustompos_pixel, Use custom Timebank button color
Gui, add, text, x316 y500 cred Disabled%use_file% vpixelTxt3,Current color:
Gui, Add, Progress, x406 y500 w20 h20 Disabled%use_file% cGreen background%Currentcolor% vCurrentcolor
Gui, add, text, x436 y500 w60 vpixelTxt4 Disabled%use_file%,(%Currentcolorbgr%)
Gui, Add, Button, x26 y530 w65 h20 %custompixelstate% gconfig vpixelbtn1,Configure
Gui, Add, Button, x106 y530 w65 h20 Disabled gsave_config_pixel vpixelbtn2,Save
Gui, add, text, x206 y530 %custompixelstate% vpixelTxt7,(wrap the window around the unpressed Timebank button)

Gui, Add, Radio, x26 y570 w280 h20 %pixeldealinstate% Checked%defpos_pixel_dealin% gsubmitsettings vdefpos_pixel_dealin, Use Theme default Imback button color
Gui, Add, Radio, x26 y590 w280 h20 %pixeldealinstate% Checked%custompos_pixel_dealin% gsubmitsettings vcustompos_pixel_dealin, Use custom Imback button color
Gui, add, text, x316 y580 cred %pixeldealinstate% vpixelTxt1,Current color:
Gui, Add, Progress, x406 y580 w20 h20 %pixeldealinstate% cGreen background%Currentcolor_dealin% vCurrentcolor_dealin
Gui, add, text, x436 y580 w60 %pixeldealinstate% vpixelTxt6 ,(%Currentcolorbgr_dealin%)
Gui, Add, Button, x26 y610 w65 h20 %custompixelstate_dealin% gconfig %dealinstate% vpixelbtn1_dealin,Configure
Gui, Add, Button, x106 y610 w65 h20 Disabled gsave_config_pixel_dealin %dealinstate% vpixelbtn2_dealin,Save
Gui, add, text, x206 y610 %custompixelstate_dealin% vpixelTxt2,(wrap the window around the Imback button and press save)

Gui, add, Checkbox, y655 x26 Checked%guishow% Vguishow, Show GUI at the script start

Gui, Add, Button, x205 y690 w55 h20 gSave,Submit
Gui, Add, Button, x265 y690 w55 h20 gCancel,Cancel
Gui, show, w526, %thisahk%
gosub,getini
Gui,Submit,nohide
Return
;-----------------------------------------------------------------------------------------------------
GetIni:
IfNotExist, %thisahk%.ini
gosub, CreateIni
IniRead, ClassicTheme,%thisahk%.ini, Options, ClassicTheme,0
IniRead, HyperSimpleTheme,%thisahk%.ini, Options, HyperSimpleTheme,0
IniRead, SlickTheme,%thisahk%.ini, Options, SlickTheme,0
IniRead, BlackTheme,%thisahk%.ini, Options, BlackTheme,0
IniRead, NovaTheme,%thisahk%.ini, Options, NovaTheme,0
IniRead, Interval1, %thisahk%.ini, Settings, Interval1
IniRead, location, %thisahk%.ini, Settings, location
IniRead, customlocation, %thisahk%.ini, Settings, customlocation,%A_space%
IniRead, dealin, %thisahk%.ini, Settings, dealin
IniRead, use_file, %thisahk%.ini, Settings, use_file,0
IniRead, use_pixel, %thisahk%.ini, Settings, use_pixel,0
IniRead, defpos_pixel,%thisahk%.ini, Options, defpos_pixel,0
IniRead, custompos_pixel,%thisahk%.ini, Options, custompos_pixel,0
IniRead, defpos_pixel_dealin,%thisahk%.ini, Options, defpos_pixel_dealin,0
IniRead, custompos_pixel_dealin,%thisahk%.ini, Options, custompos_pixel_dealin,0
IniRead, defpos_file,%thisahk%.ini, Options, defpos_file,0
IniRead, custompos_file,%thisahk%.ini, Options, custompos_file,0
IniRead, defpos_file_dealin,%thisahk%.ini, Options, defpos_file_dealin,0
IniRead, custompos_file_dealin,%thisahk%.ini, Options, custompos_file_dealin,0
IniRead, custompos_file_x,%thisahk%.ini, Options, custompos_file_x,0
IniRead, custompos_file_y,%thisahk%.ini, Options, custompos_file_y,0
IniRead, custompos_file_dealin_x,%thisahk%.ini, Options, custompos_file_dealin_x,0
IniRead, custompos_file_dealin_y,%thisahk%.ini, Options, custompos_file_dealin_y,0
IniRead, custompos_pixel_x,%thisahk%.ini, Options, custompos_pixel_x,0
IniRead, custompos_pixel_y,%thisahk%.ini, Options, custompos_pixel_y,0
IniRead, custompos_pixel_dealin_x,%thisahk%.ini, Options, custompos_pixel_dealin_x,0
IniRead, custompos_pixel_dealin_y,%thisahk%.ini, Options, custompos_pixel_dealin_y,0
IniRead, custom_color,%thisahk%.ini, Options, custom_color,0
IniRead, custom_color_dealin,%thisahk%.ini, Options, custom_color_dealin,0
IniRead, guishow, %thisahk%.ini, Settings, guishow

Theme:=(ClassicTheme=1) ? "ClassicTheme" : (HyperSimpleTheme=1) ? "HyperSimpleTheme" : (BlackTheme=1) ? "BlackTheme" : (SlickTheme=1) ? "SlickTheme" : (NovaTheme=1) ? "NovaTheme" : ""
fontcolor:=(instr(location,"not found")>0) ? "red" : (FileExist(location)) ? "green" : "red"

if customlocation
location:=customlocation
StringReplace, ddlist, ddlist, %interval1%, %Interval1%|
GuiControl, , Interval1, |%ddlist%
StringReplace, ddlist, ddlist, %interval1%|, %Interval1%
;------------------------Init--------------------------
ClassicTheme_timebank_x:=0.64423
ClassicTheme_timebank_y:=0.82791
ClassicTheme_timebank_color:=0x09357e ;0x9357e
ClassicTheme_imback_x:=0.67468
ClassicTheme_imback_y:=0.85814
ClassicTheme_imback_color:=0x000000
HyperSimpleTheme_timebank_x:=0.64423
HyperSimpleTheme_timebank_y:=0.82791
HyperSimpleTheme_timebank_color:=0xe9e6e6
HyperSimpleTheme_imback_x:=0.67468
HyperSimpleTheme_imback_y:=0.85814
HyperSimpleTheme_imback_color:=0xdfd9ce
BlackTheme_timebank_x:=0.58814
BlackTheme_timebank_y:=0.85814
BlackTheme_timebank_color:=0x01025a ;0x1025a
BlackTheme_imback_x:=0.67468
BlackTheme_imback_y:=0.85814
BlackTheme_imback_color:=0x1e1e1e
SlickTheme_timebank_x:=0.58814
SlickTheme_timebank_y:=0.85814
SlickTheme_timebank_color:=0x09092b ;0x9092b
SlickTheme_imback_x:=0.67468
SlickTheme_imback_y:=0.85814
SlickTheme_imback_color:=0x080828
NovaTheme_timebank_x:=0.94712
NovaTheme_timebank_y:=0.78372
NovaTheme_timebank_color:=0x252525
NovaTheme_imback_x:=0.85417
NovaTheme_imback_y:=0.86512
NovaTheme_imback_color:=0x4a4a4a
if defpos_file=1
{
currentpos_file_x:=%Theme%_timebank_x
currentpos_file_y:=%Theme%_timebank_y
}
else
{
currentpos_file_x:=custompos_file_x
currentpos_file_y:=custompos_file_y
}
if defpos_file_dealin=1
{
currentpos_file_dealin_x:=%Theme%_imback_x
currentpos_file_dealin_y:=%Theme%_imback_y
}
else
{
currentpos_file_dealin_x:=custompos_file_dealin_x
currentpos_file_dealin_y:=custompos_file_dealin_y
}

if defpos_pixel=1
{
currentpos_pixel_x:=%Theme%_timebank_x
currentpos_pixel_y:=%Theme%_timebank_y
}
else
{
currentpos_pixel_x:=custompos_pixel_x
currentpos_pixel_y:=custompos_pixel_y
}
if defpos_pixel_dealin=1
{
currentpos_pixel_dealin_x:=%Theme%_imback_x
currentpos_pixel_dealin_y:=%Theme%_imback_y
}
else
{
currentpos_pixel_dealin_x:=custompos_pixel_dealin_ x
currentpos_pixel_dealin_y:=custompos_pixel_dealin_ y
}

if defpos_pixel=1
Currentcolor:=DecToHex(FlipBlueAndRed(%Theme%_time bank_color))
else
Currentcolor:=DecToHex(FlipBlueAndRed(custom_color ))
if defpos_pixel_dealin=1
Currentcolor_dealin:=DecToHex(FlipBlueAndRed(%Them e%_imback_color))
else
Currentcolor_dealin:=DecToHex(FlipBlueAndRed(custo m_color_dealin))
Currentcolorbgr:=DecToHex(FlipBlueAndRed(Currentco lor))
Currentcolorbgr_dealin:=DecToHex(FlipBlueAndRed(Cu rrentcolor_dealin))
filedealinstate:=(use_file=0) ? "disabled" : (dealin=1) ? "disabled0" : "disabled"
pixeldealinstate:=(use_pixel=0) ? "disabled" : (dealin=1) ? "disabled0" : "disabled"
customfilestate:=(use_file=0) ? "disabled" : (custompos_file=1) ? "disabled0" : "disabled"
customfilestate_dealin:=(use_file=0) ? "disabled" : (dealin=0) ? "disabled" : (custompos_file_dealin=1) ? "disabled0" : "disabled"
custompixelstate:=(use_pixel=0) ? "disabled" : (custompos_pixel=1) ? "disabled0" : "disabled"
custompixelstate_dealin:=(use_pixel=0) ? "disabled" : (dealin=0) ? "disabled" : (custompos_pixel_dealin=1) ? "disabled0" : "disabled"
if guishow
{
winget,id,id, %thisahk% ahk_class AutoHotkeyGUI
if !DllCall( "IsWindowVisible", "UInt",id)
gosub, buildgui
}
Return
;-----------------------------------------------------------------------------------------------------
MakeIni:
If ClassicTheme
IniWrite, %ClassicTheme%, %thisahk%.ini, Options, ClassicTheme
If HyperSimpleTheme
IniWrite, %HyperSimpleTheme%, %thisahk%.ini, Options, HyperSimpleTheme
If SlickTheme
IniWrite, %SlickTheme%, %thisahk%.ini, Options, SlickTheme
If BlackTheme
IniWrite, %BlackTheme%, %thisahk%.ini, Options, BlackTheme
If NovaTheme
IniWrite, %NovaTheme%, %thisahk%.ini, Options, NovaTheme
If defpos_pixel
IniWrite, %defpos_pixel%, %thisahk%.ini, Options, defpos_pixel
If custompos_pixel
IniWrite, %custompos_pixel%, %thisahk%.ini, Options, custompos_pixel
If defpos_pixel_dealin
IniWrite, %defpos_pixel_dealin%, %thisahk%.ini, Options, defpos_pixel_dealin
If custompos_pixel_dealin
IniWrite, %custompos_pixel_dealin%, %thisahk%.ini, Options, custompos_pixel_dealin
If defpos_file
IniWrite, %defpos_file%, %thisahk%.ini, Options, defpos_file
If custompos_file
IniWrite, %custompos_file%, %thisahk%.ini, Options, custompos_file
If defpos_file_dealin
IniWrite, %defpos_file_dealin%, %thisahk%.ini, Options, defpos_file_dealin
If custompos_file_dealin
IniWrite, %custompos_file_dealin%, %thisahk%.ini, Options, custompos_file_dealin
if use_file
IniWrite, %use_file%, %thisahk%.ini, Settings, use_file
if use_pixel
IniWrite, %use_pixel%, %thisahk%.ini, Settings, use_pixel

if custompos_file_x
IniWrite, %custompos_file_x%, %thisahk%.ini, Options, custompos_file_x
if custompos_file_y
IniWrite, %custompos_file_y%, %thisahk%.ini, Options, custompos_file_y
if custompos_file_dealin_x
IniWrite, %custompos_file_dealin_x%, %thisahk%.ini, Options, custompos_file_dealin_x
if custompos_file_dealin_y
IniWrite, %custompos_file_dealin_y%, %thisahk%.ini, Options, custompos_file_dealin_y
if custompos_pixel_x
IniWrite, %custompos_pixel_x%, %thisahk%.ini, Options, custompos_pixel_x
if custompos_pixel_y
IniWrite, %custompos_pixel_y%, %thisahk%.ini, Options, custompos_pixel_y
if custompos_pixel_dealin_x
IniWrite, %custompos_pixel_dealin_x%, %thisahk%.ini, Options, custompos_pixel_dealin_x
if custompos_pixel_dealin_y
IniWrite, %custompos_pixel_dealin_y%, %thisahk%.ini, Options, custompos_pixel_dealin_y
if custom_color
IniWrite, %custom_color%, %thisahk%.ini, Options, custom_color
if custom_color_dealin
IniWrite, %custom_color_dealin%, %thisahk%.ini, Options, custom_color_dealin


IniWrite, %Interval1%, %thisahk%.ini, Settings, Interval1
if location
IniWrite, %location%, %thisahk%.ini, Settings, location
if customlocation
IniWrite, %customlocation%, %thisahk%.ini, Settings, customlocation

IniWrite, %dealin%, %thisahk%.ini, Settings, dealin
IniWrite, %guishow%, %thisahk%.ini, Settings, guishow
Return
;-----------------------------------------------------------------------------------------------------
CreateIni:
use_pixel:=0
use_file:=1
HyperSimpleTheme:=1
ClassicTheme:=0
SlickTheme:=0
BlackTheme:=0
NovaTheme:=0
Interval1:=5
defpos_pixel:=1
defpos_pixel_dealin:=1
defpos_file:=1
defpos_file_dealin:=1
dealin:=0
guishow:=0
gosub,detect
gosub, MakeIni
gosub, getIni
winget,id,id, %thisahk% ahk_class AutoHotkeyGUI
if !DllCall( "IsWindowVisible", "UInt",id)
gosub, buildgui
return
;-----------------------------------------------------------------------------------------------------
GuiClose:
gosub, cancel
return
;-----------------------------------------------------------------------------------------------------
2GuiClose:
return
;-----------------------------------------------------------------------------------------------------
menuGui:
gosub, getini
winget,id,id, %thisahk% ahk_class AutoHotkeyGUI
if !DllCall( "IsWindowVisible", "UInt",id)
gosub, buildgui
Gui, Submit,nohide
return
;-----------------------------------------------------------------------------------------------------
reload:
reload
return
;-----------------------------------------------------------------------------------------------------
Save:
Gui, Submit
Gui, destroy
FileDelete, %thisahk%.ini
gosub, MakeIni
;Reload
settimer,clickwithdelay,133
if use_file
{
if !instr(location,"not found")>0
settimer,FILE_CHECK,%CheckTime_file%
settimer,ClickTimebank,off
settimer,Clickimback,off
sleep,-1
}
else
{
settimer,FILE_CHECK,off
settimer,ClickTimebank,%CheckTime_pixel%
if dealin
settimer,Clickimback,1563
else
settimer,Clickimback,off
sleep,-1
}
return
;-----------------------------------------------------------------------------------------------------
Cancel:
Gui, Destroy
Return
;-----------------------------------------------------------------------------------------------------
Edit:
edit
return
;-----------------------------------------------------------------------------------------------------
exitSub:
FileDelete, %thisahk%.ini
gosub, makeini
exitApp
return
;-----------------------------------------------------------------------------------------------------
[/PHP]

i have black theme and now because of some network issue with this script sometimes my check/fold box is getting click auto which making my hand fold before i can do anything

this is because check/fold box and timebank box in same coordinates

please help
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
09-12-2014 , 05:47 AM
Use the latest script version.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
09-12-2014 , 07:42 AM
ok Thanks a lot

got v1.02c and how could i check if timebank button and check/fold button are not in same coordinates where i had the problem ?
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
09-12-2014 , 01:25 PM
Shouldn't be any problems in the latest version, you can manually configure Timebank button coordinates using "Configure" button if needed.
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote
09-12-2014 , 04:07 PM
Do i have to use custom impact button location instead of default ?
New AHK: TimeOut Helper (Instant Sit Back In) and Auto Timebank for PokerStars Quote

      
m