#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
global press := 1
DetectHiddenWindows, On
mCounter = 0
SetTitleMatchMode, 2
CoordMode, Mouse, Relative
global tableTamerActive := false
global curTableNo := 1
; 501,458 FOLD
; 578 ,464 Check/call
; 656 , 465 Raise/Allin
; 593, 434 up bet 1SB
; 465 , 493 down 1SB
; 424, 414 half pot
; 570 , 414 three quarters
; 611 , 414 pot
; 659 , 414 all in
; 38, 360 sit out nect bb
#Persistent
border_thickness = 5
border_color = FF0000
StopGui(){
SetTimer, DrawRect, off
Gui, Destroy
}
DrawRect(){
SetTimer, DrawRect, 50
border_thickness = 5
border_color = FF0000
WinGetPos, x, y, w, h, A
if (x="")
return
Gui, +Lastfound +AlwaysOnTop +Toolwindow
borderType:="inside" ; set to inside, outside, or both
if (borderType="outside") {
outerX:=0
outerY:=0
outerX2:=w+2*border_thickness
outerY2:=h+2*border_thickness
innerX:=border_thickness
innerY:=border_thickness
innerX2:=border_thickness+w
innerY2:=border_thickness+h
newX:=x-border_thickness
newY:=y-border_thickness
newW:=w+2*border_thickness
newH:=h+2*border_thickness
} else if (borderType="inside") {
WinGet, myState, MinMax, A
if (myState=1)
offset:=8
else
offset:=0
outerX:=offset
outerY:=offset
outerX2:=w-offset
outerY2:=h-offset
innerX:=border_thickness+offset
innerY:=border_thickness+offset
innerX2:=w-border_thickness-offset - 6
innerY2:=h-border_thickness-offset - 3
newX:=x + 3
newY:=y
newW:=w - 6
newH:=h - 3
} else if (borderType="both") {
outerX:=0
outerY:=0
outerX2:=w+2*border_thickness
outerY2:=h+2*border_thickness
innerX:=border_thickness*2
innerY:=border_thickness*2
innerX2:=w
innerY2:=h
newX:=x-border_thickness
newY:=y-border_thickness
newW:=w+4*border_thickness
newH:=h+4*border_thickness
}
Gui, Color, %border_color%
Gui, -Caption
;WinSet, Region, 0-0 %w%-0 %w%-%h% 0-%h% 0-0 %border_thickness%-%border_thickness% %iw%-%border_thickness% %iw%-%ih% %border_thickness%-%ih% %border_thickness%-%border_thickness%
WinSet, Region, %outerX%-%outerY% %outerX2%-%outerY% %outerX2%-%outerY2% %outerX%-%outerY2% %outerX%-%outerY% %innerX%-%innerY% %innerX2%-%innerY% %innerX2%-%innerY2% %innerX%-%innerY2% %innerX%-%innerY%
;Gui, Show, w%w% h%h% x%x% y%y% NoActivate, Table awaiting Action
Gui, Show, w%newW% h%newH% x%newX% y%newY% NoActivate, Table awaiting Action
return
}
; Activate TableTamer
SC01B::
if(tableTamerActive = false){
DrawRect()
tableTamerActive := true
WinGet, fensterID, List, Blitz
Loop, %fensterID% { ; will run loop for number of windows in array
if(%A_Index% = 1){
WinActivate, % "ahk_id " fensterID%A_Index%
WinMove, % "ahk_id " fensterID%A_Index%,0,0,680,480
curTableNo := 1
}else if (%A_Index% = 2){
WinActivate, % "ahk_id " fensterID%A_Index%
WinMove, % "ahk_id " fensterID%A_Index%,680,0,680,480
curTableNo := 2
}else if (%A_Index% = 3){
WinActivate, % "ahk_id " fensterID%A_Index%
WinMove, % "ahk_id " fensterID%A_Index%,275,0,680,480
curTableNo := 3
}
}
}else{
StopGui()
tableTamerActive := false
}
return
#if tableTamerActive = true
;fold
x::
sleep, 30
Click, 501,458
return
;sitoutbb
p::
sleep, 30
Click, 38,360
return
;call/check
v::
sleep, 30
Click, 578,464
return
;raise
r::
sleep, 30
Click, 656,465
return
;up 1sb
w::
sleep, 30
Click, 593,434
return
;down 1sb
q::
sleep, 30
Click, 465,493
return
;half pot
SC002::
sleep, 30
Click, 424,414
return
; three quarts pot
SC003::
sleep, 30
Click, 570,414
return
;pot
SC004::
sleep, 30
Click, 611,414
return
;all in
SC005::
sleep, 30
Click, 659,414
return
SC039::
WinGet, fensterID, List, Blitz
Loop, %fensterID% { ; will run loop for number of windows in array
if(curTableNo = 1){
WinActivate, % "ahk_id " fensterID2
}else if(curTableNo = 2){
WinActivate, % "ahk_id " fensterID3
}else if(curTableNo = 3){
WinActivate, % "ahk_id " fensterID1
}
}
return