New Donationware Software: Entraction helper script
Hello all.
Here's a new version which modifies the code posted by Solll some posts ago to work with the new update. I used the fix suggested by vovjkee some time ago, so other updates shouldn't break this again.
I also fixed the max buyin checkbox location.
About the HEM issue, I tried it with HEM 1.11.06b and it works.
GL
Here's a new version which modifies the code posted by Solll some posts ago to work with the new update. I used the fix suggested by vovjkee some time ago, so other updates shouldn't break this again.
I also fixed the max buyin checkbox location.
About the HEM issue, I tried it with HEM 1.11.06b and it works.
GL
Code:
; Version 0.3R7 ; percentage of the window width and height for center of buttons checkForFreeWindowTitle := "Confirm fold" autoCloseRebuyWindowTitle := "Auto Rebuy turned on" autoConfirmWaitingListWindowTitle := "Waiting List" autoConfirmLeaveTableWindowTitle:="Confirm leave" autoConfirmLargeAllInWindowTitle := "Confirm Large All-In Raise" skip_sizecheck:=1 foldX := 0.48 foldY := 0.95 checkX := 0.62 checkY := 0.95 raiseX := 0.77 raiseY := 0.95 potX := 0.71 potY := 0.86 allinX := 0.79 allinY := 0.86 betBoxX := 0.47 betBoxY := 0.82 autoRebuyX := 0.88 autoRebuyY := 0.88 sitOutX := 0.88 sitOutY := 0.94 noBlindsX := 0.88 noBlindsY := 0.97 sitInX := 0.6 sitInY := 0.9 checkForFreeX := 0.58 checkForFreeY := 0.74 maxBuyInX := 0.31 maxBuyInY := 0.52 confirmBuyInX := 0.7 confirmBuyInY := 0.9 rebuyOkX := 0.49 rebuyOkY := 0.74 confirmAllInX := 0.41 confirmAllInY := 0.73 confirmLeaveX := 0.45 confirmLeaveY := 0.73 waitlistx:=337 waitlisty:=510 confirmWaiting1X := 0.5 confirmWaiting1Y := 0.86 confirmWaiting2X := 0.41 confirmWaiting2Y := 0.86 buyin_procedure_running := 0 rebuy_procedure_running := 0 ; End general settings #SingleInstance, Force #NoEnv #MaxHotkeysPerInterval 200 SendMode Input SetTitleMatchMode 2 SetBatchLines -1 Menu, Tray, NoStandard Menu, Tray, Add, Settings, Settings Menu, Tray, Default, Settings Menu, Tray, Add, Reload, Reload Menu, Tray, Add, About, About Menu, Tray, Add, Exit, Close readIniFile() defineHotKeys() if (autoAutoFocus = 1 or) GoSub activateAutoFocus GoSub activateCheckMessage return ; GUI to choose settings Settings: ; add tabs Gui, Add, Tab, x-4 y0 w500 h750 , Table Hotkeys|Other Hotkeys|Options Gui, Add, Text, x10 y32 w100 h20 , Fold Gui, Add, Edit, x90 y30 w90 h20 vFold, %Fold% Gui, Add, Text, x10 y52 w100 h20 , Check/Call Gui, Add, Edit, x90 y50 w90 h20 vCheckCall, %CheckCall% Gui, Add, Text, x10 y72 w100 h20 , Raise Gui, Add, Edit, x90 y70 w90 h20 vRaise, %Raise% Gui, Add, Text, x10 y92 w100 h20 , All In Gui, Add, Edit, x90 y90 w90 h20 vBetAllIn, %BetAllIn% Gui, Add, CheckBox, x195 y90 w50 h20 Checked%InstantAllIn% vInstantAllIn, Instant Gui, Add, Text, x10 y112 w100 h20 , Bet Full Pot Gui, Add, Edit, x90 y110 w90 h20 vBetFullPot, %BetFullPot% Gui, Add, CheckBox, x195 y110 w50 h20 Checked%InstantFullPot% vInstantFullPot, Instant Gui, Add, Text, x10 y152 w20 h20 , Bet Gui, Add, Edit, x30 y150 w25 h20 vpercentage1, %percentage1% Gui, Add, Text, x56 y152 w40 h20 , `% pot Gui, Add, Edit, x90 y150 w90 h20 vBetPotPercentage1, %BetPotPercentage1% Gui, Add, Text, x10 y172 w20 h20 , Bet Gui, Add, Edit, x30 y170 w25 h20 vpercentage2, %percentage2% Gui, Add, Text, x56 y172 w40 h20 , `% pot Gui, Add, Edit, x90 y170 w90 h20 vBetPotPercentage2, %BetPotPercentage2% Gui, Add, Text, x10 y192 w20 h20 , Bet Gui, Add, Edit, x30 y190 w25 h20 vpercentage3, %percentage3% Gui, Add, Text, x56 y192 w40 h20 , `% pot Gui, Add, Edit, x90 y190 w90 h20 vBetPotPercentage3, %BetPotPercentage3% Gui, Add, Text, x10 y212 w20 h20 , Bet Gui, Add, Edit, x30 y210 w25 h20 vpercentage4, %percentage4% Gui, Add, Text, x56 y212 w40 h20 , `% pot Gui, Add, Edit, x90 y210 w90 h20 vBetPotPercentage4, %BetPotPercentage4% Gui, Add, Text, x10 y252 w20 h20 , Bet Gui, Add, Edit, x30 y250 w25 h20 vbbAmount1, %bbAmount1% Gui, Add, Text, x56 y252 w40 h20 , BBs Gui, Add, Edit, x90 y250 w90 h20 vBetBBAmount1, %BetBBAmount1% Gui, Add, Text, x10 y272 w20 h20 , Bet Gui, Add, Edit, x30 y270 w25 h20 vbbAmount2, %bbAmount2% Gui, Add, Text, x56 y272 w40 h20 , BBs Gui, Add, Edit, x90 y270 w90 h20 vBetBBAmount2, %BetBBAmount2% Gui, Add, Text, x10 y292 w100 h20 , Add 1 BB Gui, Add, Edit, x90 y290 w90 h20 vAdd1BB, %Add1BB% Gui, Add, Text, x10 y312 w100 h20 , Subtract 1 BB Gui, Add, Edit, x90 y310 w90 h20 vSubtract1BB, %Subtract1BB% Gui, Add, Text, x10 y332 w100 h20 , Add 1 SB Gui, Add, Edit, x90 y330 w90 h20 vAdd1SB, %Add1SB% Gui, Add, Text, x10 y352 w100 h20 , Subtract1 SB Gui, Add, Edit, x90 y350 w90 h20 vSubtract1SB, %Subtract1SB% Gui, Add, Button, x75 y400 w50 h20 gSave, Save Gui, Add, Button, x135 y400 w50 h20 gCancel, Cancel Gui, Tab, Other Hotkeys Gui, Add, Text, x5 y32 w100 h20 , Auto Rebuy Gui, Add, Edit, x85 y30 w90 h20 vAutoRebuy, %AutoRebuy% Gui, Add, Text, x5 y52 w100 h20 , Sit Out Gui, Add, Edit, x85 y50 w90 h20 vSitOut, %SitOut% Gui, Add, Text, x5 y72 w100 h20 , No More Blinds Gui, Add, Edit, x85 y70 w90 h20 vNoMoreBlinds, %NoMoreBlinds% Gui, Add, Text, x5 y92 w100 h20 , Sit In Gui, Add, Edit, x85 y90 w90 h20 vSitIn, %SitIn% Gui, Add, Text, x5 y132 w100 h20 , Exit Application Gui, Add, Edit, x85 y130 w90 h20 vExitApplication, %ExitApplication% Gui, Add, Button, x75 y400 w50 h20 gSave, Save Gui, Add, Button, x135 y400 w50 h20 gCancel, Cancel Gui, Tab, Options Gui, Add, CheckBox, x5 y30 w230 h20 Checked%actOnActiveTable% vactOnActiveTable, Act on active table (or table under mouse) Gui, Add, CheckBox, x5 y50 w200 h20 Checked%allwaysCheckForFree% vallwaysCheckForFree, Allways check for free Gui, Add, CheckBox, x5 y70 w200 h20 Checked%autoBuyInMax% vautoBuyInMax, Auto buy in for table maximum Gui, Add, CheckBox, x5 y90 w200 h20 Checked%autoConfirmRebuy% vautoConfirmRebuy, Auto confirm rebuy pop-up Gui, Add, CheckBox, x5 y110 w200 h20 Checked%autoConfirmAllIn% vautoConfirmAllIn, Auto confirm large all-in Gui, Add, CheckBox, x5 y130 w200 h20 Checked%autoConfirmLeave% vautoConfirmLeave, Auto confirm leave table pop-up Gui, Add, CheckBox, x5 y150 w200 h20 Checked%autoConfirmWaitingList% vautoConfirmWaitingList, Auto confirm waiting list pop-ups Gui, Add, CheckBox, x5 y170 w200 h20 Checked%autoAutoFocus% vautoAutoFocus, Auto Focus tables under mouse Gui, Add, Button, x75 y400 w50 h20 gSave, Save Gui, Add, Button, x135 y400 w50 h20 gCancel, Cancel Gui, Show, x100 y50 h450 w260, EntHelper Settings return Save: Gui, Submit FileDelete, EntHelper.ini writeIni() Reload return Cancel: Gui, Destroy return GuiClose: Gui, Destroy return About: Msgbox,, About, ( Entraction Helper, v0.3R4 If you like this script please consider donating some money, using one of the following options: - transfer to OSRichard on PokerStars - transfer to YorickFTP on FullTilt - Moneybookers transfer to os.pstars@gmail.com If you have any suggestions/requests/comments, PM me on 2+2 forums @ OSRichard. ) return Close: ExitApp return activateCheckMessage: SetTimer, CheckMessage, 100 return RemoveToolTip: SetTimer, RemoveToolTip, Off ToolTip return activateAutoFocus: SetTimer, autoFocusF, 100 return CheckMessage: WinGet, id, list ,ahk_class SunAwtDialog,, Program Manager Loop, %id% { this_id := id%A_Index% WinGetTitle, window_title, ahk_id %this_id% ;msgbox %window_title% if (window_title=autoCloseRebuyWindowTitle and autoConfirmRebuy=1 and rebuy_procedure_running=0) { rebuy_procedure_running=1 CoordMode, Mouse, Screen MouseGetPos, px, py WinGetPos, WindowXpos, WindowYpos , confirm_width, confirm_height, ahk_id %this_id% WinGetClass, this_class, ahk_id %this_id% ;msgbox %this_class% ;MsgBox, Notepad is at %WindowXpos%`,%WindowYpos% size %confirm_width%, %confirm_height% if ((confirm_width=394 and confirm_height=125)or(skip_sizecheck=1)) { ;msgbox here ClickX := Round(confirm_width * rebuyOkX) ClickY := Round(confirm_height * rebuyOkY) absoluteX:=WindowXpos+ClickX absoluteY:=WindowYpos+ClickY ;MsgBox %absoluteX% %absoluteY% %Xpos%` %Ypos% MouseClick,, absoluteX, absoluteY,, 0 ;MouseMove, absoluteX,absoluteY, 0 MouseMove, px, py, 0 sleep 150 rebuy_procedure_running=0 } } if (window_title=checkForFreeWindowTitle and allwaysCheckForFree=1) { CoordMode, Mouse, Screen MouseGetPos, px, py WinGetPos, WindowXpos, WindowYpos , confirm_width, confirm_height, ahk_id %this_id% WinGetClass, this_class, ahk_id %this_id% ;msgbox %this_class% ;MsgBox, Notepad is at %WindowXpos%`,%WindowYpos% size %confirm_width%, %confirm_height% if ((confirm_width=387 and confirm_height=125)or(skip_sizecheck=1)) { ;msgbox here ClickX := Round(confirm_width * checkForFreeX) ClickY := Round(confirm_height * checkForFreeY) absoluteX:=WindowXpos+ClickX absoluteY:=WindowYpos+ClickY ;MsgBox %absoluteX% %absoluteY% %Xpos%` %Ypos% MouseClick,, absoluteX, absoluteY,, 0 ;MouseMove, absoluteX,absoluteY, 0 MouseMove, px, py, 0 sleep 150 } } if (window_title=autoConfirmWaitingListWindowTitle and autoConfirmWaitingList=1) { ; press "Ok" button CoordMode, Mouse, Screen MouseGetPos, px, py WinGetPos, WindowXpos, WindowYpos , confirm_width, confirm_height, ahk_id %this_id% if ((confirm_width=400 and confirm_height=265)or(skip_sizecheck=1)) { ClickX := Round(confirm_width * confirmWaiting1X) ClickY := Round(confirm_height * confirmWaiting1Y) ;Tooltip, title: %title%`nX: %X%`nY: %Y%`nautoConfirmWaitingListWindowTitle: %autoConfirmWaitingListWindowTitle% ;SetTimer, RemoveToolTip, 5000 absoluteX:=WindowXpos+ClickX absoluteY:=WindowYpos+ClickY MouseClick,, absoluteX, absoluteY,, 0 ClickX := Round(confirm_width * confirmWaiting2X) ClickY := Round(confirm_height * confirmWaiting2Y) absoluteX:=WindowXpos+ClickX absoluteY:=WindowYpos+ClickY ;Tooltip, title: %title%`nX: %X%`nY: %Y%`nautoConfirmWaitingListWindowTitle: %autoConfirmWaitingListWindowTitle% ;SetTimer, RemoveToolTip, 5000 MouseClick,, absoluteX, absoluteY,, 0 CoordMode, Mouse, Screen MouseMove, px, py, 0 sleep 100 } } if (window_title="" and autoBuyInMax=1 and buyin_procedure_running=0) { sleep 600 ;msgbox buyin_procedure_running %buyin_procedure_running% buyin_procedure_running=1 CoordMode, Mouse, Screen MouseGetPos, px, py ;msgbox buyin_procedure_running %buyin_procedure_running% WinGetPos, WindowXpos, WindowYpos , confirm_width, confirm_height, ahk_id %this_id% ClickX := Round(confirm_width * maxBuyInX) ClickY := Round(confirm_height * maxBuyInY) ;Tooltip, title: %title%`nX: %X%`nY: %Y% ;SetTimer, RemoveToolTip, 5000 absoluteX:=WindowXpos+ClickX absoluteY:=WindowYpos+ClickY MouseClick,, absoluteX, absoluteY,, 0 ;MouseMove, absoluteX,absoluteY, 0 ;sleep 1000 ClickX := Round(confirm_width * confirmBuyInX) ClickY := Round(confirm_height * confirmBuyInY) absoluteX:=WindowXpos+ClickX absoluteY:=WindowYpos+ClickY ;MouseMove, absoluteX,absoluteY, 0 MouseClick,, absoluteX, absoluteY,, 0 ;MouseMove, px, py, 0 ;msgbox buyin_procedure_running %buyin_procedure_running% MouseMove, px, py, 0 sleep 100 buyin_procedure_running=0 } if (window_title=autoConfirmLeaveTableWindowTitle and autoConfirmLeave=1) { CoordMode, Mouse, Screen MouseGetPos, px, py WinGetPos, WindowXpos, WindowYpos , confirm_width, confirm_height, ahk_id %this_id% if ((confirm_width=289 and confirm_height=125 )or(skip_sizecheck=1)) { ;msgbox sddsd ClickX := Round(confirm_width * confirmLeaveX) ClickY := Round(confirm_height * confirmLeaveY) absoluteX:=WindowXpos+ClickX absoluteY:=WindowYpos+ClickY ;MsgBox %absoluteX% %absoluteY% %Xpos%` %Ypos% MouseClick,, absoluteX, absoluteY,, 0 MouseMove, px, py, 0 } } if (window_title=autoConfirmLargeAllInWindowTitle and autoConfirmAllIn=1) { CoordMode, Mouse, Screen MouseGetPos, px, py WinGetPos, WindowXpos, WindowYpos , confirm_width, confirm_height, ahk_id %this_id% if ((confirm_width=277 and confirm_height=125 )or(skip_sizecheck=1)) { ;msgbox sddsd ClickX := Round(confirm_width * confirmAllInX) ClickY := Round(confirm_height * confirmAllInY) absoluteX:=WindowXpos+ClickX absoluteY:=WindowYpos+ClickY ;MsgBox %absoluteX% %absoluteY% %Xpos%` %Ypos% MouseClick,, absoluteX, absoluteY,, 0 MouseMove, px, py, 0 } } } return ; autofocus coded by Solll autoFocusF: MouseGetPos, , , ID2, control WinGetClass, winClass11, ahk_id %ID2% tableId := getTableID() WinGetClass, winClassFromId, ahk_id %tableId% ;msgbox %winClass11% if (winClass11 = winClassFromId) { SetMouseDelay, -1 MouseGetPos,,,hovwin,hovcontrol WinGetClass, hovclass, ahk_id %hovwin% IfWinNotActive, ahk_id %hovwin% if hovclass <> #32769 { WinActivate ahk_id %hovwin% ControlFocus %hovcontrol%, ahk_id %hovwin% return } } return ; code in this function suggested by vovjkee getTableID() { global actOnActiveTable ID := "" if (actOnActiveTable = 1) { WinGet, ID,, A } else { MouseGetPos,,,ID } WinGetTitle, title, ahk_id %id% Needle := ") [Connection: " IfInString, title, %Needle% { return ID } ID := "" return ID } bet(ID, percentage, key) { ;Traytip,, bet ID: %ID% if (ID = "") { if (key <> "") Send {%key%} return } Critical, On pressPotButton(ID, key) betSize := readBetBox(ID) newBetSize := Round(betSize * percentage / 100,2) ;Tooltip, ID: %ID%`nbetSize: %betSize%`npercentage: %percentage%`nnewBetSize: %newBetSize% ;SetTimer, RemoveToolTip, 5000 writeBetBox(ID, newBetSize) Critical, Off } betBB(ID, amount, key) { ;Traytip,, bet ID: %ID% if (ID = "") { if (key <> "") Send {%key%} return } Critical, On bigBlind := getBlind(ID, "bb") newBetSize := Round(bigBlind * amount,2) ;Tooltip, ID: %ID%`nbetSize: %betSize%`npercentage: %percentage%`nnewBetSize: %newBetSize% ;SetTimer, RemoveToolTip, 5000 writeBetBox(ID, newBetSize) Critical, Off } changeBet(ID, direction, amount, key) { global actOnActiveTable ;Traytip,, changebet ID: %ID%`nactOnActiveTable: %actOnActiveTable% if (ID = "") { if (key <> "") Send {%key%} return } if (actOnActiveTable <> 1) WinActivate, ahk_id %ID% ;IfWinNotActive ahk_class l1l1.jA ;{ ; Send {%key%} ; return ;} Critical, On betSize := readBetBox(ID) ;MsgBox, betSize: %betSize% if (amount = "bb") or (amount = "sb") raiseSize := getBlind(ID, amount) ;Msgbox, raiseSize: %raiseSize% if (direction = "up") newBetSize := betSize + raiseSize else newBetSize := betSize - raiseSize ;MsgBox %newBetSize% writeBetBox(ID, newBetSize) Critical, Off } getBlind(ID, amount) { WinGetTitle, title, ahk_id %ID% StringSplit, title_array, title, ( StringSplit, game_type_blinds_connection, title_array%title_array0%, ) StringSplit, game_type_blinds, game_type_blinds_connection1, %A_Space% ;ttt := game_type_blinds%game_type_blinds0% ;Traytip,, title: %title%`nblinds: %ttt% StringSplit, blinds, game_type_blinds%game_type_blinds0%, / if (amount = "sb") return blinds1 else return blinds2 } readBetBox(ID) { global actOnActiveTable, betBoxX, betBoxY ;Traytip,, readbetbox ID: %ID%`nactOnActiveTable: %actOnActiveTable% if (ID = "") { return } if (actOnActiveTable <> 1) WinActivate, ahk_id %ID% ;IfWinNotActive ahk_class l1l1.jA ; return "" WinGetActiveStats, title, width, height, ax, ay X := Round(width * betBoxX) Y := Round(height * betBoxY) ;Traytip,, title: %title%`nX: %X%`nY: %Y% CoordMode, Mouse, Screen MouseGetPos, px, py CoordMode, Mouse, Relative MouseClick,, X, Y,, 0 sleep 50 oldClipBoard = %clipBoard% clipboard = ; Start off empty to allow ClipWait to detect when the text has arrived. Send {HOME}+{END} Send ^c ClipWait 0.2 ; Wait for the clipboard to contain text. If !ErrorLevel text := clipboard clipboard = %oldClipBoard% CoordMode, Mouse, Screen MouseMove, px, py, 0 CoordMode, Mouse, Relative ;Tooltip, text: %text% ;SetTimer, RemoveToolTip, 3000 return text } writeBetBox(ID, betSize) { global actOnActiveTable, betBoxX, betBoxY if (ID = "") { return } if (actOnActiveTable <> 1) WinActivate, ahk_id %ID% ;IfWinNotActive ahk_class l1l1.jA ; return WinGetActiveStats, title, width, height, ax, ay X := Round(width * betBoxX) Y := Round(height * betBoxY) ;Traytip,, title: %title%`nX: %X%`nY: %Y% CoordMode, Mouse, Screen MouseGetPos, px, py CoordMode, Mouse, Relative MouseClick,, X, Y,, 0 sleep 50 ;Tooltip, betSize: %betSize% ;SetTimer, RemoveToolTip, 3000 Send {HOME}+{END}%betSize% CoordMode, Mouse, Screen MouseMove, px, py, 0 CoordMode, Mouse, Relative } pressFoldButton(ID, key) { global FoldX, FoldY PressButton(ID, FoldX, FoldY, key) } pressCheckButton(ID, key) { global CheckX, CheckY PressButton(ID, CheckX, CheckY, key) } pressRaiseButton(ID, key) { global RaiseX, RaiseY PressButton(ID, RaiseX, RaiseY, key) } pressPotButton(ID, key) { global PotX, PotY PressButton(ID, PotX, PotY, key) } pressAllInButton(ID, key) { global AllInX, AllInY PressButton(ID, AllInX, AllInY, key) } PressButton(ID, qx, qy, key) { global actOnActiveTable ;msgbox %key% ;Traytip,, button ID: %ID%`nactOnActiveTable: %actOnActiveTable% if (ID = "") { if (key <> "") Send {%key%} return } if (actOnActiveTable <> 1) WinGetPos, ax, ay, width, height, ahk_id %ID% else WinGetActiveStats, title, width, height, ax, ay ;IfWinNotActive ahk_class l1l1.jA ;{ ;TrayTip,, Sending %key% ;if (key <> "") ; Send {%key%} ;return ;} X := Round(width * qx) Y := Round(height * qy) ;Traytip,, title: %title%`nX: %X%`nY: %Y% CoordMode, Mouse, Screen MouseGetPos, px, py CoordMode, Mouse, Relative MouseClick,, X, Y,, 0 CoordMode, Mouse, Screen MouseMove, px, py, 0 CoordMode, Mouse, Relative } readIniFile() { global IfNotExist, EntHelper.ini { createIni() ;Traytip,, Inifile created return } ; read general options IniRead, actOnActiveTable, EntHelper.ini, Options, actOnActiveTable, 0 IniRead, allwaysCheckForFree, EntHelper.ini, Options, allwaysCheckForFree, 0 IniRead, autoBuyInMax, EntHelper.ini, Options, autoBuyInMax, 0 IniRead, autoConfirmRebuy, EntHelper.ini, Options, autoConfirmRebuy, 0 IniRead, autoConfirmAllIn, EntHelper.ini, Options, autoConfirmAllIn, 0 IniRead, autoConfirmLeave, EntHelper.ini, Options, autoConfirmLeave, 0 IniRead, autoConfirmWaitingList, EntHelper.ini, Options, autoConfirmWaitingList, 0 IniRead, autoAutoFocus, EntHelper.ini, Options, autoAutoFocus, 0 IniRead, InstantAllIn, EntHelper.ini, Options, InstantAllIn, 0 IniRead, InstantFullPot, EntHelper.ini, Options, InstantFullPot, 0 ; read pot percentages IniRead, percentage1, EntHelper.ini, PotPercentages, percentage1, 0 IniRead, percentage2, EntHelper.ini, PotPercentages, percentage2, 0 IniRead, percentage3, EntHelper.ini, PotPercentages, percentage3, 0 IniRead, percentage4, EntHelper.ini, PotPercentages, percentage4, 0 IniRead, bbAmount1, EntHelper.ini, PotPercentages, bbAmount1, 0 IniRead, bbAmount2, EntHelper.ini, PotPercentages, bbAmount2, 0 ; read hotkeys IniRead, Fold, EntHelper.ini, Hotkeys, Fold, %A_Space% IniRead, CheckCall, EntHelper.ini, Hotkeys, CheckCall, %A_Space% IniRead, Raise, EntHelper.ini, Hotkeys, Raise, %A_Space% IniRead, BetPotPercentage1, EntHelper.ini, Hotkeys, BetPotPercentage1, %A_Space% IniRead, BetPotPercentage2, EntHelper.ini, Hotkeys, BetPotPercentage2, %A_Space% IniRead, BetPotPercentage3, EntHelper.ini, Hotkeys, BetPotPercentage3, %A_Space% IniRead, BetPotPercentage4, EntHelper.ini, Hotkeys, BetPotPercentage4, %A_Space% IniRead, BetBBAmount1, EntHelper.ini, Hotkeys, BetBBAmount1, %A_Space% IniRead, BetBBAmount2, EntHelper.ini, Hotkeys, BetBBAmount2, %A_Space% IniRead, BetFullPot, EntHelper.ini, Hotkeys, BetFullPot, %A_Space% IniRead, BetAllIn, EntHelper.ini, Hotkeys, BetAllIn, %A_Space% IniRead, Add1BB, EntHelper.ini, Hotkeys, Add1BB, %A_Space% IniRead, Subtract1BB, EntHelper.ini, Hotkeys, Subtract1BB, %A_Space% IniRead, Add1SB, EntHelper.ini, Hotkeys, Add1SB, %A_Space% IniRead, Subtract1SB, EntHelper.ini, Hotkeys, Subtract1SB, %A_Space% IniRead, ExitApplication, EntHelper.ini, Hotkeys, ExitApplication, %A_Space% IniRead, AutoRebuy, EntHelper.ini, Hotkeys, AutoRebuy, %A_Space% IniRead, SitOut, EntHelper.ini, Hotkeys, SitOut, %A_Space% IniRead, NoMoreBlinds, EntHelper.ini, Hotkeys, NoMoreBlinds, %A_Space% IniRead, SitIn, EntHelper.ini, Hotkeys, SitIn, %A_Space% } createIni() { global ; set general options actOnActiveTable := False allwaysCheckForFree := True autoBuyInMax := True autoConfirmRebuy := True autoConfirmAllIn := False autoConfirmLeave := False autoConfirmWaitingList := True autoAutoFocus:= True InstantAllIn := False InstantFullPot := False ; set pot percentages percentage1 := 66 percentage2 := 75 percentage3 := 90 percentage4 := 115 bbAmount1 := 2.5 bbAmount2 := 4.5 ;set hotkeys Fold = NumpadHome CheckCall = NumpadUp Raise = NumpadPgUp BetBBAmount1 = NumpadLeft BetBBAmount2 = NumpadClear BetPotPercentage1 = NumpadRight BetPotPercentage2 = NumpadEnd BetPotPercentage3 = NumpadDown BetPotPercentage4 = NumpadPgDn BetFullPot = NumpadAdd BetAllIn = NumpadIns Add1BB = WheelUp Subtract1BB = WheelDown ExitApplication = F8 AutoRebuy = F9 SitOut = F10 NoMoreBlinds = F11 SitIn = F12 writeIni() } writeIni() { global ; write general options if actOnActiveTable IniWrite, %actOnActiveTable%, EntHelper.ini, Options, actOnActiveTable if allwaysCheckForFree IniWrite, %allwaysCheckForFree%, EntHelper.ini, Options, allwaysCheckForFree if autoBuyInMax IniWrite, %autoBuyInMax%, EntHelper.ini, Options, autoBuyInMax if autoConfirmRebuy IniWrite, %autoConfirmRebuy%, EntHelper.ini, Options, autoConfirmRebuy if autoConfirmAllIn IniWrite, %autoConfirmAllIn%, EntHelper.ini, Options, autoConfirmAllIn if autoConfirmLeave IniWrite, %autoConfirmLeave%, EntHelper.ini, Options, autoConfirmLeave if autoConfirmWaitingList IniWrite, %autoConfirmWaitingList%, EntHelper.ini, Options, autoConfirmWaitingList if autoAutoFocus IniWrite, %autoAutoFocus%, EntHelper.ini, Options, autoAutoFocus if InstantAllIn IniWrite, %InstantAllIn%, EntHelper.ini, Options, InstantAllIn if InstantFullPot IniWrite, %InstantFullPot%, EntHelper.ini, Options, InstantFullPot ; write pot percentages if percentage1 IniWrite, %percentage1%, EntHelper.ini, PotPercentages, percentage1 if percentage2 IniWrite, %percentage2%, EntHelper.ini, PotPercentages, percentage2 if percentage3 IniWrite, %percentage3%, EntHelper.ini, PotPercentages, percentage3 if percentage4 IniWrite, %percentage4%, EntHelper.ini, PotPercentages, percentage4 if bbAmount1 IniWrite, %bbAmount1%, EntHelper.ini, PotPercentages, bbAmount1 if bbAmount2 IniWrite, %bbAmount2%, EntHelper.ini, PotPercentages, bbAmount2 ; write hotkeys if Fold IniWrite, %Fold%, EntHelper.ini, Hotkeys, Fold if CheckCall IniWrite, %CheckCall%, EntHelper.ini, Hotkeys, CheckCall if Raise IniWrite, %Raise%, EntHelper.ini, Hotkeys, Raise if BetPotPercentage1 IniWrite, %BetPotPercentage1%, EntHelper.ini, Hotkeys, BetPotPercentage1 if BetPotPercentage2 IniWrite, %BetPotPercentage2%, EntHelper.ini, Hotkeys, BetPotPercentage2 if BetPotPercentage3 IniWrite, %BetPotPercentage3%, EntHelper.ini, Hotkeys, BetPotPercentage3 if BetPotPercentage4 IniWrite, %BetPotPercentage4%, EntHelper.ini, Hotkeys, BetPotPercentage4 if BetBBAmount1 IniWrite, %BetBBAmount1%, EntHelper.ini, Hotkeys, BetBBAmount1 if BetBBAmount2 IniWrite, %BetBBAmount2%, EntHelper.ini, Hotkeys, BetBBAmount2 if BetFullPot IniWrite, %BetFullPot%, EntHelper.ini, Hotkeys, BetFullPot if BetAllIn IniWrite, %BetAllIn%, EntHelper.ini, Hotkeys, BetAllIn if Add1BB IniWrite, %Add1BB%, EntHelper.ini, Hotkeys, Add1BB if Subtract1BB IniWrite, %Subtract1BB%, EntHelper.ini, Hotkeys, Subtract1BB if Add1SB IniWrite, %Add1SB%, EntHelper.ini, Hotkeys, Add1SB if Subtract1SB IniWrite, %Subtract1SB%, EntHelper.ini, Hotkeys, Subtract1SB if ExitApplication IniWrite, %ExitApplication%, EntHelper.ini, Hotkeys, ExitApplication if AutoRebuy IniWrite, %AutoRebuy%, EntHelper.ini, Hotkeys, AutoRebuy if SitOut IniWrite, %SitOut%, EntHelper.ini, Hotkeys, SitOut if NoMoreBlinds IniWrite, %NoMoreBlinds%, EntHelper.ini, Hotkeys, NoMoreBlinds if SitIn IniWrite, %SitIn%, EntHelper.ini, Hotkeys, SitIn } defineHotKeys() { global if Fold HotKey, %Fold%, Fold if CheckCall HotKey, %CheckCall%, CheckCall if Raise HotKey, %Raise%, Raise if BetPotPercentage1 HotKey, %BetPotPercentage1%, BetPotPercentage1 if BetPotPercentage2 HotKey, %BetPotPercentage2%, BetPotPercentage2 if BetPotPercentage3 HotKey, %BetPotPercentage3%, BetPotPercentage3 if BetPotPercentage4 HotKey, %BetPotPercentage4%, BetPotPercentage4 if BetBBAmount1 HotKey, %BetBBAmount1%, BetBBAmount1 if BetBBAmount2 HotKey, %BetBBAmount2%, BetBBAmount2 if BetFullPot HotKey, %BetFullPot%, BetFullPot if BetAllIn HotKey, %BetAllIn%, BetAllIn if Add1BB HotKey, %Add1BB%, Add1BB if Subtract1BB HotKey, %Subtract1BB%, Subtract1BB if Add1SB HotKey, %Add1SB%, Add1SB if Subtract1SB HotKey, %Subtract1SB%, Subtract1SB if ExitApplication HotKey, %ExitApplication%, ExitApplication if AutoRebuy HotKey, %AutoRebuy%, AutoRebuy if SitOut HotKey, %SitOut%, SitOut if NoMoreBlinds HotKey, %NoMoreBlinds%, NoMoreBlinds if SitIn HotKey, %SitIn%, SitIn } ;#IfWinActive , FunMoney 319 (Texas Hold'em No Limit 2/4) [Connection: Excellent] #IfWinActive ,Texas Hold'em No Limit Fold: pressFoldButton(getTableID(), Fold) return CheckCall: pressCheckButton(getTableID(), CheckCall) return Raise: pressRaiseButton(getTableID(), Raise) return BetPotPercentage1: bet(getTableID(), percentage1, BetPotPercentage1) return BetPotPercentage2: bet(getTableID(), percentage2, BetPotPercentage2) return BetPotPercentage3: bet(getTableID(), percentage3, BetPotPercentage3) return BetPotPercentage4: bet(getTableID(), percentage4, BetPotPercentage4) return BetBBAmount1: betBB(getTableID(), bbAmount1, BetBBAmount1) return BetBBAmount2: betBB(getTableID(), bbAmount2, BetBBAmount2) return BetFullPot: bet(getTableID(), 100, BetFullPot) if (InstantFullPot = True) pressRaiseButton(getTableID(), "") return BetAllIn: pressAllInButton(getTableID(), BetAllIn) if (InstantAllIn = True) pressRaiseButton(getTableID(), "") return Add1BB: changeBet(getTableID(), "up", "bb", Add1BB) return Subtract1BB: changeBet(getTableID(), "down", "bb", Subtract1BB) return Add1SB: changeBet(getTableID(), "up", "sb", Add1SB) return Subtract1SB: changeBet(getTableID(), "down", "sb", Subtract1SB) return ExitApplication: GoSub Close return AutoRebuy: PressButton(getTableID(), autoRebuyX, autoRebuyY, AutoRebuy) return SitOut: PressButton(getTableID(), sitOutX, sitOutY, SitOut) return NoMoreBlinds: PressButton(getTableID(), noBlindsX, noBlindsY, NoMoreBlinds) return SitIn: PressButton(getTableID(), sitInX, sitInY, SitIn) return Reload: Reload return
for some reason the hotkeys don't work at all for me right now.
for exaple "RButton" for fold...no reaction
for exaple "RButton" for fold...no reaction
What version were you using before, from which post?
Can you post a picture of one of the tables?
Can you post a picture of one of the tables?
There weren't big changes since then. Table detection is done in the same way.
What Windows version are you using? If on Vista or 7, did you give administrator rights to the Autohotkey executable, or the compiled script (if you compiled it)?
What Windows version are you using? If on Vista or 7, did you give administrator rights to the Autohotkey executable, or the compiled script (if you compiled it)?
I also didn't get Numpad buttons to work while F9 for rebuy and other buttons worked fine.
So i did change Fold hotkey to F1 and call for F2 etc.
And voila, it works. =)
I have Win 7, might be different name for those buttons or so?
Haven't really tested it in action yet, but looks great!
Thank you!
So i did change Fold hotkey to F1 and call for F2 etc.
And voila, it works. =)
I have Win 7, might be different name for those buttons or so?
Haven't really tested it in action yet, but looks great!
Thank you!
Could you please add the option to check the AutoReload checkbox on every table I sit down?
win7...can't remember now the admin rights as i am on a business trip but i'll check it tomorrow. thanks man
Sorry, I'm not planning on adding any new features.
Is that possible to make condition that action is made to active table+mouse on it.
I tried to 12 table with this, works great, but one rare problem:
I have mouse one table and im pressing some hotkey, other table need attention, it becomes active for couple ms before script returns activation on table with mouse on.
If i press hotkey in that time-window, action goes to other table.
With that condition it would not act in any table, that would be much better.
I tried to 12 table with this, works great, but one rare problem:
I have mouse one table and im pressing some hotkey, other table need attention, it becomes active for couple ms before script returns activation on table with mouse on.
If i press hotkey in that time-window, action goes to other table.
With that condition it would not act in any table, that would be much better.
Is that possible to make condition that action is made to active table+mouse on it.
I tried to 12 table with this, works great, but one rare problem:
I have mouse one table and im pressing some hotkey, other table need attention, it becomes active for couple ms before script returns activation on table with mouse on.
If i press hotkey in that time-window, action goes to other table.
With that condition it would not act in any table, that would be much better.
I tried to 12 table with this, works great, but one rare problem:
I have mouse one table and im pressing some hotkey, other table need attention, it becomes active for couple ms before script returns activation on table with mouse on.
If i press hotkey in that time-window, action goes to other table.
With that condition it would not act in any table, that would be much better.
I only 6 table but get a ton of misclicks b/c of that, and they cost a lot of money. It's pretty much -EV to use the script with hot keys right now, though just the auto-clicking ok / auto joining thing is great in itself. I realize it's not your fault for not planning this, it's just the bad way entraction software is set up
Please do this and I'll donate €10 right when it's done. Or you could make it a commercial version with some new features, I'm sure many would buy it
I didn't find a way to prevent tables stealing focus.
What you can do is write to Entraction support, and ask them to modify the software to prevent this focus stealing.
What you can do is write to Entraction support, and ask them to modify the software to prevent this focus stealing.
Like remember the table name which is under the cursor when an action key is pressed, and only act on that table, regardless of where focus is. Is this possible?
AutoFocus is made by 100 (ms?) timer.
Thats a problem i guess. One small solve would be to make timer faster, then its more unlikely that it will act on other table since it refresh faster.
SetTimer, autoFocusF, 100
to
SetTimer, autoFocusF, 1
I have no idea what i'm doing, i don't know the language at all but i guess thats the case. Anyway it can still happen =(
How about this:
The things what is done in Autofocus timer, same things should be done in beginning of function getTableID()
so it would refresh focus just before getting ID of active table.
Did i get it right?
Thats a problem i guess. One small solve would be to make timer faster, then its more unlikely that it will act on other table since it refresh faster.
SetTimer, autoFocusF, 100
to
SetTimer, autoFocusF, 1
I have no idea what i'm doing, i don't know the language at all but i guess thats the case. Anyway it can still happen =(
How about this:
The things what is done in Autofocus timer, same things should be done in beginning of function getTableID()
so it would refresh focus just before getting ID of active table.
Did i get it right?
with the old script the hotkeys work perfectly fine
I did try to modify getTableID function to refresh before action.
I tested it by setting autofocus timer to very slow, and then problem occurs often. I couldnt get it to act in wrong table, so i think it works.
I just copied focus from timer+check the table title.
Anything wrong with this?
getTableID()
{
global actOnActiveTable
MouseGetPos,,,hovwin,hovcontrol
WinGetClass, hovclass, ahk_id %hovwin%
WinGetTitle, title, ahk_id %hovwin%
Needle := ") [Connection: "
IfInString, title, %Needle%
{
WinActivate ahk_id %hovwin%
ControlFocus %hovcontrol%, ahk_id %hovwin%
}
ID := ""
if (actOnActiveTable = 1)
{
WinGet, ID,, A
}
else
{
MouseGetPos,,,ID
}
WinGetTitle, title, ahk_id %id%
Needle := ") [Connection: "
IfInString, title, %Needle%
{
return ID
}
ID := ""
return ID
}
I tested it by setting autofocus timer to very slow, and then problem occurs often. I couldnt get it to act in wrong table, so i think it works.
I just copied focus from timer+check the table title.
Anything wrong with this?
getTableID()
{
global actOnActiveTable
MouseGetPos,,,hovwin,hovcontrol
WinGetClass, hovclass, ahk_id %hovwin%
WinGetTitle, title, ahk_id %hovwin%
Needle := ") [Connection: "
IfInString, title, %Needle%
{
WinActivate ahk_id %hovwin%
ControlFocus %hovcontrol%, ahk_id %hovwin%
}
ID := ""
if (actOnActiveTable = 1)
{
WinGet, ID,, A
}
else
{
MouseGetPos,,,ID
}
WinGetTitle, title, ahk_id %id%
Needle := ") [Connection: "
IfInString, title, %Needle%
{
return ID
}
ID := ""
return ID
}
Try toggling the NumLock key. The numpad buttons depend on it.
I did try to modify getTableID function to refresh before action.
I tested it by setting autofocus timer to very slow, and then problem occurs often. I couldnt get it to act in wrong table, so i think it works.
I just copied focus from timer+check the table title.
Anything wrong with this?
getTableID()
{
global actOnActiveTable
MouseGetPos,,,hovwin,hovcontrol
WinGetClass, hovclass, ahk_id %hovwin%
WinGetTitle, title, ahk_id %hovwin%
Needle := ") [Connection: "
IfInString, title, %Needle%
{
WinActivate ahk_id %hovwin%
ControlFocus %hovcontrol%, ahk_id %hovwin%
}
ID := ""
if (actOnActiveTable = 1)
{
WinGet, ID,, A
}
else
{
MouseGetPos,,,ID
}
WinGetTitle, title, ahk_id %id%
Needle := ") [Connection: "
IfInString, title, %Needle%
{
return ID
}
ID := ""
return ID
}
I tested it by setting autofocus timer to very slow, and then problem occurs often. I couldnt get it to act in wrong table, so i think it works.
I just copied focus from timer+check the table title.
Anything wrong with this?
getTableID()
{
global actOnActiveTable
MouseGetPos,,,hovwin,hovcontrol
WinGetClass, hovclass, ahk_id %hovwin%
WinGetTitle, title, ahk_id %hovwin%
Needle := ") [Connection: "
IfInString, title, %Needle%
{
WinActivate ahk_id %hovwin%
ControlFocus %hovcontrol%, ahk_id %hovwin%
}
ID := ""
if (actOnActiveTable = 1)
{
WinGet, ID,, A
}
else
{
MouseGetPos,,,ID
}
WinGetTitle, title, ahk_id %id%
Needle := ") [Connection: "
IfInString, title, %Needle%
{
return ID
}
ID := ""
return ID
}
Well if it works, then all is fine
It's not working for me. Replaced the gettableid() function between likes 508-528 with APO's one, and it broke the autofocus and hotkeys
doesn't help
napsus, if you have a problem that numbad keys not working, i had similar problem and commentated it in post #156
ComplexP, i use this with
Act on active table OFF
Auto focus tables under mouse ON
ComplexP, i use this with
Act on active table OFF
Auto focus tables under mouse ON
thanks, but i just can't get the hotkeys to work. i have tried all the tricks mentioned here. i'll just use the older version then.
i use RButton to fold....and that doesn't work either and it would be the most useful thing for me
i use RButton to fold....and that doesn't work either and it would be the most useful thing for me
got this to work, but RButton for fold does not work
The hotkeys arent working for me.
New computer, win7 x64
The only thing working for me is auto sitdown at table, auto reload full.
New computer, win7 x64
The only thing working for me is auto sitdown at table, auto reload full.
slightly irritating...but what to do.
$20 on stars for anyone who fixes the hotkeys without ****ing up some other functions
$20 on stars for anyone who fixes the hotkeys without ****ing up some other functions
Feedback is used for internal purposes. LEARN MORE