I'll try to combine all most wanted functions for PokerStars cash players in this script.
Vista/Windows 7 users: running script as admin is recommended, turning aero theme off might speed things up.
All functions work with any table position (tiled,cascaded,stacked).
HyperSimple/Classic themes supported for now.
I'm not cash player myself so you have to tell me which functions should be added/fixed. Waiting for requests/bug reports.
You can send donation with "Donate" menu option if you want me to spare more time on this script.
Code:
; #### StarsCash ####
; AHK version: 1.0.48.05
; date: January 03,2010
version := "1.00"
; author: Max1mums (max1mums@overcards.com)
#SingleInstance, Force
#NoEnv
Settitlematchmode, 2
OnExit exitSub
StringTrimRight, thisahk, A_ScriptName, 4
SetWorkingDir %A_ScriptDir%
Menu, Tray, NoStandard
Menu, Tray, Add, Settings, menugui
Menu, Tray, Add
Menu, Tray, Add, Reload, reload
Menu, Tray, Default, Settings
Menu, Tray, Add
Menu, Tray, Add, Suspend, Suspend
Menu, Tray, Add
Menu, Tray, Add, Edit, Edit
Menu, Tray, Add
Menu, Tray, Add, Donate, Donation
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
}
}
settitlematchmode,2
SysGet, xbord, 32
SysGet, ybord, 33
SysGet, cap, 4
; Border of the "Highlighter"
border_color := "ff0000"
border_size := 5
trans := 255
boost:=false
timerback:=true
timerbank:=true
settimer,HeroSeated,500
gosub,getini
winget,list,list,ahk_class PokerStarsTableFrameClass
loop %list%
{
id:=list%A_index%
if seated%id% is not number
{
loop %list%
{
id:=list%A_index%
seated%id%:=2
}
break
}
}
;;;;;;;;;;;;;;End of init;;;;;;;;;;;;;;
loop
{
IsTableNew()
popupwatcher()
if timerback
{
if ClickImBack
settimer,ClickBack,1500
else
settimer,ClickBack,off
timerback:=false
}
if timerbank
{
if Timebank
settimer,ClickTimebank,1500
else
settimer,ClickTimebank,off
timerbank:=false
}
if TakeSeat
TakeSeat()
if Highlight
Highlighter()
if MoveMouse
if IsWindowNew()
MoveMouse()
sleep,100
}
;-----------------------------------------------------------------------------------------------------
IsTableNew()
{
global
winget,list,list,ahk_class PokerStarsTableFrameClass
loop %list%
{
id:=list%A_index%
if seated%id% is not number
{
wingetpos,xstart%id%,ystart%id%,,,ahk_id%id%
if move
WinMove, ahk_id%id%,, xpos,ypos
seated%id%:=1
}
}
}
return
;-----------------------------------------------------------------------------------------------------
IsWindowNew()
{
global oldtitle
wingetactivetitle,title
if oldtitle!=%title%
{
oldtitle:=title
return 1
}
else
return 0
}
;-----------------------------------------------------------------------------------------------------
Popupwatcher()
{
global
if CheckWhenFree
CheckWhenFree()
if Buyin
{
ifwinexist, Buy-in ahk_class #32770
{
winget,id,id,Buy-in ahk_class #32770
ControlGet, v, Visible,,Edit1, ahk_id %id%
if v
{
if max
{
SetControlDelay, -1
Control, Check,, Button1, ahk_id %id%
ControlClick, Button4, ahk_id %id%
}
if remembered
{
ControlClick, Button4, ahk_id %id%
}
if xbb
{
parent:=DllCall("GetParent","uint",id)
wingettitle,title,ahk_id %parent%
stringtrimleft,hero,title,InStr(title, A_space,false,0)
If ((InStr(title, "No Limit") OR InStr(title, "Pot Limit")) AND InStr(title, "Tournament") = 0)
{
StringMid, bb, title, InStr(title, "/") + 1, InStr(title, a_space,"", InStr(title, "/")) - InStr(title, "/") - 1
}
else if (InStr(title, "No Limit") <> 0 AND InStr(title, "Tournament") <> 0)
{
StringMid, bb, title, InStr(title, "/", "", InStr(title, "Blinds")) + 1, InStr(title, a_space, "", InStr(title, "Blinds") + 8) - InStr(title, "/", "", InStr(title, "Blinds")) - 1 ;___so we retrieve the big blind instead
}
StringReplace,bb,bb,$,,1
StringReplace,bb,bb,€,,1
StringReplace,bb,bb,Ђ,,1
bb*=bbmultiplier
ControlSetText, Edit1, %bb%, ahk_id%id%
ControlClick, Button4, ahk_id %id%
}
}
}
}
}
return
;-----------------------------------------------------------------------------------------------------
CheckWhenFree()
{
IfWinExist, PokerStars, Check
{
ControlClick, Check
}
}
return
;-----------------------------------------------------------------------------------------------------
HeroSeated:
winget,list1,list,ahk_class PokerStarsTableFrameClass
loop %list1%
{
winid:=list1%A_index%
wingettitle,title,ahk_id%winid%
col:=PixelColorA(0.0115,0.6800,winid,1)
if seated%winid%=1
if instr(title,"Logged In")
if (instr(col,"15193294")) or (instr(col,"-0-")) or (instr(col,"16777215"))
{
if move
{
if AutoMoveBack
{
WinMove, ahk_id%winid%,, xstart%winid%,ystart%winid%
seated%winid%:=2
}
}
if Autopost
{
if !instr(title,"fast")
{
click_x :=0.0142
click_y :=0.7224
PostclickStars(click_x,click_y,winid,0)
}
}
if waitbb
;if ((checkbb=1 & instr(title,"fast")) || (uncheckbb=1 & !instr(title,"fast")))
{
click_x :=0.6629
click_y :=0.8555
PostclickStars(click_x,click_y,winid,0)
}
if seated%winid%!=2
seated%winid%:=3
}
}
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,colx1=0,coly1=0)
{
global boost,xbord,ybord,cap
if boost
critical,6
setwindelay, -1
hdc_frame := DllCall( "GetDC", "UInt", id )
hdc_buffer := DllCall("gdi32.dll\CreateCompatibleDC", "UInt", hdc_frame)
WinGetPos,,,W,H,ahk_id %id%
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,"UInt",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 10
{
delta:=A_index
loop 10
{
delta1:=A_index
p := DllCall("GetPixel", "UInt", hdc_buffer, "Int", x+delta , "Int", y+delta1)
;p1:=p
;SetFormat, IntegerFast, hex
;p += 0
;p .= ""
;SetFormat, IntegerFast, d
;pix.=p . "*" . p1 . "-"
pix.=p . "-"
}
}
}
else
{
pix := DllCall("GetPixel", "UInt", hdc_buffer, "Int", x, "Int", y)
if colx1
{
x:=floor(((W-2*xbord)*colx1)) + xbord
y:=floor(((H-(2*ybord)-cap)*coly1)) + ybord + cap
pix1 := DllCall("GetPixel", "UInt", hdc_buffer, "Int", x, "Int", y)
}
else
pix1=
SetFormat, IntegerFast, hex
pix += 0
pix .= ""
pix1 += 0
pix1 .= ""
SetFormat, IntegerFast, d
}
if pix1
pix.="-" . pix1
sleep,1
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 )
if boost
{
critical,off
sleep,-1
}
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
}
;-----------------------------------------------------------------------------------------------------
SitOutNextAll:
;ClickImBack:=false
settimer,ClickBack,off
WinGet, list, List, ahk_class PokerStarsTableFrameClass
Loop, %list%
{
Z:=list%A_Index%
WinGetPos,,, W, H, ahk_id %Z%
Sittingout:=PixelColorA(0.8125,0.8621,Z)
If !((Sittingout=0x000000) OR (Sittingout=0xDFD9CE) OR (Sittingout=0xD2EBF3) OR (Sittingout=0xB3A39D) OR (Sittingout=0x9D9D9D) OR (Sittingout=0xCCCCCC) OR (Sittingout=0xDEDBCE) OR (Sittingout=0xB5A29c) OR (Sittingout=0xBDAEAD) OR (Sittingout=0x343434) OR (Sittingout=0x444444) OR (Sittingout=0x333333))
{
back_x:=0.0141
back_y:=0.6860
PostClickStars(back_x, back_y, Z, 0)
}
}
return
;-----------------------------------------------------------------------------------------------------
RemoveSitout:
;ClickImBack:=true
if ClickImBack
settimer,ClickBack,1500
WinGet, list, List, ahk_class PokerStarsTableFrameClass
Loop, %list%
{
Z:=list%A_Index%
WinGetPos,,, W, H, ahk_id %Z%
Sittingout:=PixelColorA(0.8125,0.8621,Z)
JoinWaitingList:=PixelColorA(0.8625,0.8621,Z)
If (Sittingout=0x000000) OR (Sittingout=0xDFD9CE) OR (Sittingout=0xD2EBF3) OR (Sittingout=0xB3A39D) OR (Sittingout=0x9D9D9D) OR (Sittingout=0xCCCCCC) OR (Sittingout=0xDEDBCE) OR (Sittingout=0xB5A29c) OR (Sittingout=0xBDAEAD) OR (Sittingout=0x343434) OR (Sittingout=0x444444) OR (Sittingout=0x333333)
If (JoinWaitingList!=0x000000) AND (JoinWaitingList!=0xDFD9CE) AND (JoinWaitingList!=0xDEDBCE) AND (JoinWaitingList!=0x0xB5A29c) AND (JoinWaitingList!=0xBDAEAD) AND (JoinWaitingList!=0x1f1f1f) AND (JoinWaitingList!=0x343434) AND (JoinWaitingList!=0x0202020) AND (JoinWaitingList!=0xe6e6e6) AND (JoinWaitingList!=0xdddddd) AND (JoinWaitingList!=0x1e1e1e) AND (JoinWaitingList!=0xb0b0b0)
{
back_x :=0.7515
back_y :=0.8468
PostClickStars(back_x, back_y, Z, 0)
}
}
return
;-----------------------------------------------------------------------------------------------------
ClickBack:
winget,list,list, ahk_class PokerStarsTableFrameClass
loop %list%
{
back_x:=0.8125
back_y:=0.8621
id:=list%A_index%
col:=PixelColorA(back_x,back_y,id,0,0.8625,0.8621)
stringsplit,c,col,-
Sittingout:=c1
JoinWaitingList:=c2
If (Sittingout=0x000000) OR (Sittingout=0xDFD9CE) OR (Sittingout=0xD2EBF3) OR (Sittingout=0xB3A39D) OR (Sittingout=0x9D9D9D) OR (Sittingout=0xCCCCCC) OR (Sittingout=0xDEDBCE) OR (Sittingout=0xB5A29c) OR (Sittingout=0xBDAEAD) OR (Sittingout=0x343434) OR (Sittingout=0x444444) OR (Sittingout=0x333333)
If (JoinWaitingList!=0x000000) AND (JoinWaitingList!=0xDFD9CE) AND (JoinWaitingList!=0xDEDBCE) AND (JoinWaitingList!=0x0xB5A29c) AND (JoinWaitingList!=0xBDAEAD) AND (JoinWaitingList!=0x1f1f1f) AND (JoinWaitingList!=0x343434) AND (JoinWaitingList!=0x0202020) AND (JoinWaitingList!=0xe6e6e6) AND (JoinWaitingList!=0xdddddd) AND (JoinWaitingList!=0x1e1e1e) AND (JoinWaitingList!=0xb0b0b0)
{
postclickstars(back_x,back_y,id,0)
}
}
return
;-----------------------------------------------------------------------------------------------------
Toggleimback:
If (ClickImBack=true) {
ClickImBack:=false
settimer,ClickBack,off
T=Off
}
else {
ClickImBack:=true
settimer,ClickBack,1500
T=On
}
Gui, 2:Add, Text,, Auto Click Im Back: %T%
Gui, 2:+ToolWindow
Gui, 2:Show, w150 h20
Sleep, 1000
Gui, 2:Destroy
return
;-----------------------------------------------------------------------------------------------------
ClickTimebank:
{
winget,list,list, ahk_class PokerStarsTableFrameClass
loop %list%
{
id:=list%A_index%
col:=PixelColorA(0.6500,0.7670,id,1)
;FileAppend, %col%`n`n, test.txt
if (instr(col,"13484978")) or (instr(col,"1000084")) ;or (instr(col,"16777215")) ; 0xdfd9ce
{
click_x :=0.6582
click_y :=0.7729
PostClickStars(click_x, click_y, id, 0)
}
}
}
return
;-----------------------------------------------------------------------------------------------------
Joinwaitlist:
winget,list,list, ahk_class PokerStarsTableFrameClass
loop %list%
{
id:=list%A_index%
;col:=PixelColorA(0.6165,0.9352,id,1)
col:=PixelColorA(0.6274,0.9352,id,1)
;FileAppend, %col%`n`n, test.txt
if !(instr(col,"15921906")) & !(instr(col,"16777215"))
{
click_x :=0.8625
click_y :=0.8621
PostclickStars(click_x,click_y,id,0)
}
}
return
;-----------------------------------------------------------------------------------------------------
Unjoinwaitlist:
winget,list,list, ahk_class PokerStarsTableFrameClass
loop %list%
{
id:=list%A_index%
;col:=PixelColorA(0.6165,0.9352,id,1)
col:=PixelColorA(0.6274,0.9352,id,1)
if InStr(col,"15921906") or (instr(col,"16777215"))
{
click_x :=0.8625
click_y :=0.8621
PostclickStars(click_x,click_y,id,0)
}
}
return
;-----------------------------------------------------------------------------------------------------
MoveBackByKey:
ifwinactive, ahk_class PokerStarsTableFrameClass
{
winget,id,id,A
if (seated%id%=1) or (seated%id%=3)
{
wingettitle,title,ahk_id%id%
seated%id%:=2
WinMove, ahk_id%id%,, xstart%id%,ystart%id%
}
}
return
;-----------------------------------------------------------------------------------------------------
TakeSeat()
{
IfWinExist, PokerStars ahk_class #32770
{
WinGet, list, list, Seat Available ahk_class #32770
Loop, %list%
{
This_id := list%A_Index%
ControlFocus, Button2, ahk_id%this_id%
Sleep, -1
ControlSend, Button2, {SPACE}, ahk_id%this_id%
}
}
}
return
;-----------------------------------------------------------------------------------------------------
HighLighter(Highlight=1) ;x_mouse=0.75, y_mouse=0.75
{
global last_table_id
global border_color
global border_size
global trans
global ActiveX,ActiveY,ActiveW,ActiveH
ifwinactive,ahk_class PokerStarsTableFrameClass
{
winget,id,id,A
OldX := ActiveX
OldY := ActiveY
OldW := ActiveW
OldH := ActiveH
WinGetActiveStats,ActiveTitle, ActiveW, ActiveH, ActiveX, ActiveY
if (id != last_table_id) || ((OldX <> ActiveX || OldY <> ActiveY || OldW <> ActiveW || OldH <> ActiveH))
{
mouse_last:=last_table_id
last_table_id := id
if(!id)
{
Gui, 2: Cancel
Gui, 3: Cancel
Gui, 4: Cancel
Gui, 5: Cancel
return
}
WinGetPos, x, y, w, h, ahk_id%id%
global xbord
global cap
x := x + xbord
y := y + xbord + cap
w := w - (2*xbord)
h := h - (2*xbord) - cap
;Makes Border around urgent table
if ( Highlight = 1 ) {
;top
guinum := 2
Gui, %guinum%: +Alwaysontop +Lastfound +Owner
Gui, %guinum%: Color, %border_color%
WinSet, Transparent, %trans%
Gui, %guinum%: -Caption
Gui, %guinum%: Show, w%w% h%border_size% x%x% y%y% NoActivate
;left
guinum++
Gui, %guinum%: +Alwaysontop +Lastfound +Owner
Gui, %guinum%: Color, %border_color%
WinSet, Transparent, %trans%
Gui, %guinum%: -Caption
Gui, %guinum%: Show, w%border_size% h%h% x%x% y%y% NoActivate
;bottom
guinum++
Gui, %guinum%: +Alwaysontop +Lastfound +Owner
Gui, %guinum%: Color, %border_color%
WinSet, Transparent, %trans%
Gui, %guinum%: -Caption
y2 := y + h - border_size
Gui, %guinum%: Show, w%w% h%border_size% x%x% y%y2% NoActivate
;right
guinum++
Gui, %guinum%: +Alwaysontop +Lastfound +Owner
Gui, %guinum%: Color, %border_color%
WinSet, Transparent, %trans%
Gui, %guinum%: -Caption
x2 := x + w - border_size
Gui, %guinum%: Show, w%border_size% h%h% x%x2% y%y% NoActivate
}
}
}
else
{
Gui, 2: Cancel
Gui, 3: Cancel
Gui, 4: Cancel
Gui, 5: Cancel
last_table_id=
}
}
return
;-----------------------------------------------------------------------------------------------------
MoveMouse(x_mouse=0.75, y_mouse=0.75)
{
global xbord
global cap
wingetclass,class,A
wingetactivetitle,title
if class=PokerStarsTableFrameClass
if instr(title,"Logged In")
{
winget,id,id,A
relStarsClientPoint(id, x_mouse, y_mouse,0,1)
DllCall("SetCursorPos", int, x_mouse, int, y_mouse)
}
}
return
;-----------------------------------------------------------------------------------------------------
BuildGui:
Gui, color, white
;Gui, font, cOlive
Gui, add, tab, h340 w240, General|Time|Annoyances|New Table
Gui, Tab, General
Gui, Add, Radio, x26 y50 w180 h20 Checked%ClassicTheme% vClassicTheme, Classic Theme
Gui, Add, Radio, x26 y70 w180 h20 Checked%HyperSimpleTheme% vHyperSimpleTheme, HyperSimple Theme
Gui, Add, Radio, x26 y90 w180 h20 Checked%BlackTheme% vBlackTheme, Black Theme
Gui, Add, Radio, x26 y110 w180 h20 Checked%SlickTheme% vSlickTheme, Slick Theme
Gui, add, text, y145 x25, Highlight active table
Gui, add, Checkbox, y145 x180 Checked%Highlight% VHighlight
Gui, add, text, y165 x25, Move mouse to action buttons
Gui, add, Checkbox, y165 x180 Checked%MoveMouse% VMoveMouse
Gui, Add, Button, x75 y315 w55 h20 gSave,Submit
Gui, Add, Button, x135 y315 w55 h20 gCancel,Cancel
Gui, Tab, New Table
Gui, add, text, y55 x25, Move new table
Gui, add, Checkbox, y55 x120 Checked%move% Vmove
Gui, add, text, y75 x35, to position
Gui, Add, Text, x25 y95 w120 h20 , x
Gui, Add, Edit, x50 y95 w50 h20 vxpos, %xpos%
Gui, Add, Text, x25 y115 ,y
Gui, Add, Edit, x50 y115 w50 h20 vypos, %ypos%
Gui, add, Checkbox, y145 x180 Checked%automoveback% Vautomoveback
Gui, add, text, y145 x25,Move table back automatically
Gui, Add, Text, x25 y165 ,Move table back manually
Gui, Add, Edit, x180 y162 w50 h20 vmovebackByKey, %movebackByKey%
Gui, Add, Button, x75 y315 w55 h20 gSave,Submit
Gui, Add, Button, x135 y315 w55 h20 gCancel,Cancel
Gui, Tab, Annoyances
Gui, add, Checkbox, y50 x190 Checked%TakeSeat% VTakeSeat
Gui, add, text, y50 x25,Auto Take Seat
Gui, add, Checkbox, y70 x190 Checked%Autopost% VAutopost
Gui, add, text, y70 x25,Auto post blinds
Gui, add, Checkbox, y100 x190 Checked%Waitbb% VWaitbb
Gui, add, text, y100 x25,Uncheck wait for big blind
;Gui, Add, Radio, x120 y90 w70 h15 Checked%checkbb% vcheckbb, check
;Gui, Add, Radio, x120 y105 w70 h15 Checked%uncheckbb% vuncheckbb, uncheck
Gui, add, Checkbox, y120 x190 Checked%CheckWhenFree% VCheckWhenFree
Gui, add, text, y120 x25,Never fold for free
Gui, add, Checkbox, y160 x90 Checked%Buyin% VBuyin
Gui, add, text, y160 x25,Auto Buy-in
Gui, Add, Radio, x120 y150 w100 h20 Checked%max% vmax, Maximum
Gui, Add, Radio, x120 y170 w120 h20 Checked%remembered% vremembered, Remembered/default
Gui, Add, Radio, x120 y190 w20 h20 Checked%xbb% vxbb
Gui, Add, Edit, x140 y190 w30 h20 vbbmultiplier, %bbmultiplier%
Gui, Add, Text, x170 y193,BB
Gui, Add, Button, x75 y315 w55 h20 gSave,Submit
Gui, Add, Button, x135 y315 w55 h20 gCancel,Cancel
Gui, Tab, Time
Gui, add, Checkbox, y50 x180 Checked%ClickImBack% VClickImBack
Gui, add, text, y50 x25,Click Im Back automatically
Gui, Add, Text, x25 y70 ,Toggle Click Im Back
Gui, Add, Edit, x180 y67 w50 h20 vToggleImBack, %ToggleImBack%
Gui, add, Checkbox, y110 x180 Checked%Timebank% VTimebank
Gui, add, text, y110 x25,Click Timebank automatically
Gui, Add, Text, x25 y150 ,Sitout on all tables
Gui, Add, Edit, x180 y147 w50 h20 vSitOutNextAll, %SitOutNextAll%
Gui, Add, Text, x25 y175 ,Remove sitout on all tables
Gui, Add, Edit, x180 y172 w50 h20 vRemoveSitout, %RemoveSitout%
Gui, Add, Text, x25 y220 ,Join waiting list on all tables
Gui, Add, Edit, x180 y217 w50 h20 vjoinwaitlist, %joinwaitlist%
Gui, Add, Text, x25 y245 ,Unjoin waiting list on all tables
Gui, Add, Edit, x180 y242 w50 h20 vunjoinwaitlist, %unjoinwaitlist%
Gui, Add, Button, x75 y315 w55 h20 gSave,Submit
Gui, Add, Button, x135 y315 w55 h20 gCancel,Cancel
Gosub, GetIni
Gui, show, w256, %thisahk%
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, Highlight, %thisahk%.ini, Settings, Highlight, 0
IniRead, MoveMouse, %thisahk%.ini, Settings, MoveMouse, 0
IniRead, ClickImBack, %thisahk%.ini, Settings, ClickImBack, 0
IniRead, Toggleimback, %thisahk%.ini, Hotkeys, Toggleimback,%A_Space%
IniRead, TakeSeat, %thisahk%.ini, Settings, TakeSeat, 0
IniRead, Timebank, %thisahk%.ini, Settings, Timebank, 0
IniRead, Autopost, %thisahk%.ini, Settings, Autopost, 0
IniRead, Waitbb, %thisahk%.ini, Settings, Waitbb, 0
IniRead, CheckWhenFree, %thisahk%.ini, Settings, CheckWhenFree, 0
IniRead, checkbb, %thisahk%.ini, Settings, checkbb, 0
IniRead, uncheckbb, %thisahk%.ini, Settings, uncheckbb, 0
IniRead, Buyin, %thisahk%.ini, Settings, Buyin, 0
IniRead, max, %thisahk%.ini, Settings, max, 0
IniRead, remembered, %thisahk%.ini, Settings, remembered, 0
IniRead, xbb, %thisahk%.ini, Settings, xbb, 0
IniRead, bbmultiplier, %thisahk%.ini, Variables, bbmultiplier,0
IniRead, move, %thisahk%.ini, Settings, move, 0
IniRead, automoveback, %thisahk%.ini, Settings, automoveback, 0
IniRead, movebackByKey, %thisahk%.ini, Hotkeys, movebackByKey,%A_Space%
IniRead, SitOutNextAll, %thisahk%.ini, Hotkeys, SitOutNextAll,%A_Space%
IniRead, RemoveSitout, %thisahk%.ini, Hotkeys, RemoveSitout,%A_Space%
IniRead, joinwaitlist, %thisahk%.ini, Hotkeys, joinwaitlist,%A_Space%
IniRead, unjoinwaitlist, %thisahk%.ini, Hotkeys, unjoinwaitlist,%A_Space%
IniRead, ypos, %thisahk%.ini, Variables, ypos,0
IniRead, xpos, %thisahk%.ini, Variables, xpos,0
if SitOutNextAll
Hotkey, %SitOutNextAll%,SitOutNextAll
if RemoveSitout
Hotkey, %RemoveSitout%,RemoveSitout
if joinwaitlist
Hotkey, %joinwaitlist%,joinwaitlist
if Unjoinwaitlist
Hotkey, %Unjoinwaitlist%,Unjoinwaitlist
If Toggleimback
{
HotKey, IfWinActive
Hotkey, %Toggleimback%, Toggleimback
}
if MoveBackByKey
Hotkey, %MoveBackByKey%,MoveBackByKey
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
IniWrite, %Highlight%, %thisahk%.ini, Settings, Highlight
IniWrite, %MoveMouse%, %thisahk%.ini, Settings, MoveMouse
IniWrite, %ClickImBack%, %thisahk%.ini, Settings, ClickImBack
IniWrite, %TakeSeat%, %thisahk%.ini, Settings, TakeSeat
IniWrite, %Timebank%, %thisahk%.ini, Settings, Timebank
IniWrite, %Autopost%, %thisahk%.ini, Settings, Autopost
IniWrite, %Waitbb%, %thisahk%.ini, Settings, Waitbb
if checkbb
IniWrite, %checkbb%, %thisahk%.ini, Settings, checkbb
if uncheckbb
IniWrite, %uncheckbb%, %thisahk%.ini, Settings, uncheckbb
IniWrite, %CheckWhenFree%, %thisahk%.ini, Settings, CheckWhenFree
IniWrite, %Buyin%, %thisahk%.ini, Settings, Buyin
if max
IniWrite, %max%, %thisahk%.ini, Settings, max
if remembered
IniWrite, %remembered%, %thisahk%.ini, Settings, remembered
if xbb
IniWrite, %xbb%, %thisahk%.ini, Settings, xbb
IniWrite, %bbmultiplier%, %thisahk%.ini, Variables, bbmultiplier
IniWrite, %move%, %thisahk%.ini, Settings, move
IniWrite, %automoveback%, %thisahk%.ini, Settings, automoveback
if moveback
IniWrite, %moveback%, %thisahk%.ini, Hotkeys, moveback
if SitOutNextAll
IniWrite, %SitOutNextAll%, %thisahk%.ini, Hotkeys, SitOutNextAll
if RemoveSitout
IniWrite, %RemoveSitout%, %thisahk%.ini, Hotkeys, RemoveSitout
if joinwaitlist
IniWrite, %joinwaitlist%, %thisahk%.ini, Hotkeys, joinwaitlist
if Unjoinwaitlist
IniWrite, %unjoinwaitlist%, %thisahk%.ini, Hotkeys, unjoinwaitlist
if Toggleimback
IniWrite, %Toggleimback%, %thisahk%.ini, Hotkeys, Toggleimback
if MoveBackByKey
IniWrite, %MoveBackByKey%, %thisahk%.ini, Hotkeys, MoveBackByKey
IniWrite, %ypos%, %thisahk%.ini, Variables, ypos
IniWrite, %xpos%, %thisahk%.ini, Variables, xpos
Return
;-----------------------------------------------------------------------------------------------------
CreateIni:
HyperSimpleTheme:=1
Highlight:=0
MoveMouse:=0
TakeSeat:=0
Timebank:=0
Autopost:=0
Waitbb:=0
uncheckbb:=1
CheckWhenFree:=1
Buyin:=0
remembered:=1
bbmultiplier:=50
move:=0
ClickImBack:=0
automoveback:=0
xpos:=100
ypos:=100
gosub, MakeIni
return
;-----------------------------------------------------------------------------------------------------
GuiClose:
gosub, cancel
return
;-----------------------------------------------------------------------------------------------------
menuGui:
gosub, getini
;If DllCall( "IsWindowVisible", "UInt",GUI1 )
gosub, buildgui
Gui, Submit,nohide
return
;-----------------------------------------------------------------------------------------------------
reload:
reload
return
;-----------------------------------------------------------------------------------------------------
Save:
Gui, Submit
FileDelete, %thisahk%.ini
gosub, MakeIni
Reload
return
;-----------------------------------------------------------------------------------------------------
Cancel:
Gui, Destroy
Return
;-----------------------------------------------------------------------------------------------------
Suspend:
suspend
return
;-----------------------------------------------------------------------------------------------------
Edit:
edit
return
;-----------------------------------------------------------------------------------------------------
donation:
WinMenuSelectItem, PokerStars Lobby,, Requests, Transfer Funds...
WinWait, Transfer Funds ahk_class #32770, , 10
WinGet, tf, id
ControlFocus, Edit2, ahk_id%tf%
ControlSetText, Edit2, Max1mums
ControlFocus, Edit1, ahk_id%tf%
Sleep, -1
ControlSetText, Edit1,
GuiControl, Disable, Donate
;-----------------------------------------------------------------------------------------------------
exitSub:
FileDelete, %thisahk%.ini
gosub, makeini
exitApp
return
;-----------------------------------------------------------------------------------------------------