Open Side Menu Go to the Top
Register
New Donationware Software: Entraction helper script New Donationware Software: Entraction helper script

10-29-2009 , 03:16 PM
Nearly everything you want is in the settings. To access the settings go to the H icon in the tray, right click and select settings.

Quote:
Originally Posted by Roelof-
When i press the fold hotkey it selects the active table, so very often when 8-tabling it folds at the wrong table. can u make it so that it folds on the table under the mouse cursor?
In the settings, go to the last tab (Options) and uncheck "Act on active table"

Quote:
Originally Posted by Roelof-
Also i need a button that makes me raise 3.5bb+1bbxlimper preflop and presses the raise button as well if thats possible, none of the potsize bets seem to make it 3.5bb+1limper pre.
What you are describing is the full pot (3.5bb+1bb/limper). If you also want to raise it automatically, go to this section:

Code:
BetFullPot:
    bet(getTableID(), 100, BetFullPot)
return
and replace it with this:

Code:
BetFullPot:
    bet(getTableID(), 100, BetFullPot)
    pressRaiseButton(getTableID(), Raise)
return
Please take into consideration that this will auto-raise every time you use the "bet full pot" hotkey.

Quote:
Originally Posted by Roelof-
Also the mouse scroll wheel blocks, there is a wheel function in the software so thats probably causing it. removing the mouse wheel function would probably solve it.
Go to Settings, first tab (Table Hotkeys) and erase "WheelUp" and "WheelDown" hotkeys.
New Donationware Software: Entraction helper script Quote
10-29-2009 , 06:47 PM
Allright i started using the last update and it says that ot received 71 hotkeys in the last 651ms when i press the fold button than exits.
thanks for ur detailed help btw
New Donationware Software: Entraction helper script Quote
10-29-2009 , 08:15 PM
Roelof, thanks for your donation.

Here is a version that should work. I tested it for a few minutes and seems to be ok. It already has the full pot auto-raise, so just copy/paste it in a new ahk file.

Code:
; Version 0.3R1

; percentage of the window width and height for center of buttons
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.44

confirmBuyInX := 0.7
confirmBuyInY := 0.89

rebuyOkX := 0.49
rebuyOkY := 0.74

confirmAllInX := 0.41
confirmAllInY := 0.73

confirmLeaveX := 0.45
confirmLeaveY := 0.73
; End general settings

#SingleInstance, Force
#NoEnv
SendMode Input
SetTitleMatchMode 3
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 (allwaysCheckForFree = 1)
    GoSub activateAllwaysCheckForFree

if (autoBuyInMax = 1)
    GoSub autoBuyInForMax
    
if (autoConfirmRebuy = 1)
    GoSub activateAutoConfirmRebuy
    
if (autoConfirmAllIn = 1)
    GoSub activateAutoConfirmAllIn
    
if (autoConfirmLeave = 1)
    GoSub activateAutoConfirmLeave

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, Text, x10 y152 w20 h20 , Bet
    Gui, Add, Edit, x90 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 y232 w20 h20 , Bet
    Gui, Add, Edit, x30 y230 w25 h20 vpercentage5, %percentage5%
    Gui, Add, Text, x56 y232 w40 h20 , `% pot
    Gui, Add, Edit, x90 y230 w90 h20 vBetPotPercentage5, %BetPotPercentage5%
    Gui, Add, Text, x10 y252 w20 h20 , Bet
    Gui, Add, Edit, x30 y250 w25 h20 vpercentage6, %percentage6%
    Gui, Add, Text, x56 y252 w40 h20 , `% pot
    Gui, Add, Edit, x90 y250 w90 h20 vBetPotPercentage6, %BetPotPercentage6%
    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, 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

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

BetPotPercentage5:
    bet(getTableID(), percentage5, BetPotPercentage5)
return

BetPotPercentage6:
    bet(getTableID(), percentage6, BetPotPercentage6)
return

BetFullPot:
    bet(getTableID(), 100, BetFullPot)
    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

About:
    Msgbox,, About,
    (
    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

RemoveToolTip:
    SetTimer, RemoveToolTip, Off
    ToolTip
return

activateAllwaysCheckForFree:
    SetTimer, checkForFree, 500
return

autoBuyInForMax:
    SetTimer, buyInForMax, 500
return

activateAutoConfirmRebuy:
    SetTimer, autoCloseRebuy, 500
return

activateAutoConfirmAllIn:
    SetTimer, autoConfirmLargeAllIn, 500
return

activateAutoConfirmLeave:
    SetTimer, autoConfirmLeaveTable, 500
return

checkForFree:
    checkForFreeWindowTitle := "Confirm fold"

    IfWinExist, %checkForFreeWindowTitle%
    {
        
        ; press "Check" button
        CoordMode, Mouse, Screen
        MouseGetPos, px, py
        CoordMode, Mouse, Relative
        WinGetActiveStats, title, width, height, ax, ay
        X := Round(width * checkForFreeX)
        Y := Round(height * checkForFreeY)
        ;Tooltip, title: %title%`nX: %X%`nY: %Y%`ncheckForFreeWindowTitle: %checkForFreeWindowTitle%
        ;SetTimer, RemoveToolTip, 5000
        MouseClick,, X, Y,, 0
        CoordMode, Mouse, Screen
        MouseMove, px, py, 0
        CoordMode, Mouse, Relative
    }
return

buyInForMax:
    IfWinExist, ahk_class SunAwtDialog
    {
        WinGetActiveStats, title, width, height, ax, ay
        if (title = "") {
            CoordMode, Mouse, Screen
            MouseGetPos, px, py
            CoordMode, Mouse, Relative
            X := Round(width * maxBuyInX)
            Y := Round(height * maxBuyInY)
            ;Tooltip, title: %title%`nX: %X%`nY: %Y%
            ;SetTimer, RemoveToolTip, 5000
            MouseClick,, X, Y,, 0
            sleep 50
            X := Round(width * confirmBuyInX)
            Y := Round(height * confirmBuyInY)
            MouseClick,, X, Y,, 0
            CoordMode, Mouse, Screen
            MouseMove, px, py, 0
            CoordMode, Mouse, Relative
        }
    }
return

autoCloseRebuy:
    autoCloseRebuyWindowTitle := "Auto Rebuy turned on"

    IfWinExist, %autoCloseRebuyWindowTitle%
    {
        ; press "Ok" button
        CoordMode, Mouse, Screen
        MouseGetPos, px, py
        CoordMode, Mouse, Relative
        WinGetActiveStats, title, width, height, ax, ay
        X := Round(width * rebuyOkX)
        Y := Round(height * rebuyOkY)
        ;Tooltip, title: %title%`nX: %X%`nY: %Y%`nautoCloseRebuyWindowTitle: %autoCloseRebuyWindowTitle%
        ;SetTimer, RemoveToolTip, 5000
        MouseClick,, X, Y,, 0
        CoordMode, Mouse, Screen
        MouseMove, px, py, 0
        CoordMode, Mouse, Relative
    }
return

autoConfirmLargeAllIn:
    autoConfirmLargeAllInWindowTitle := "Confirm Large All-In Raise"

    IfWinExist, %autoConfirmLargeAllInWindowTitle%
    {
        ; press "Ok" button
        CoordMode, Mouse, Screen
        MouseGetPos, px, py
        CoordMode, Mouse, Relative
        WinGetActiveStats, title, width, height, ax, ay
        X := Round(width * confirmAllInX)
        Y := Round(height * confirmAllInY)
        ;Tooltip, title: %title%`nX: %X%`nY: %Y%`nautoConfirmLargeAllInWindowTitle: %autoConfirmLargeAllInWindowTitle%
        ;SetTimer, RemoveToolTip, 5000
        MouseClick,, X, Y,, 0
        CoordMode, Mouse, Screen
        MouseMove, px, py, 0
        CoordMode, Mouse, Relative
    }
return

autoConfirmLeaveTable:
    autoConfirmLeaveTableWindowTitle := "Confirm leave"

    IfWinExist, %autoConfirmLeaveTableWindowTitle%
    {
        ; press "Ok" button
        CoordMode, Mouse, Screen
        MouseGetPos, px, py
        CoordMode, Mouse, Relative
        WinGetActiveStats, title, width, height, ax, ay
        X := Round(width * confirmLeaveX)
        Y := Round(height * confirmLeaveY)
        ;Tooltip, title: %title%`nX: %X%`nY: %Y%`nautoConfirmLeaveTableWindowTitle: %autoConfirmLeaveTableWindowTitle%
        ;SetTimer, RemoveToolTip, 5000
        MouseClick,, X, Y,, 0
        CoordMode, Mouse, Screen
        MouseMove, px, py, 0
        CoordMode, Mouse, Relative
    }
return

getTableID()
{
    global actOnActiveTable
  
    ID := ""
    if (actOnActiveTable = 1) {
        WinGet, ID,, A 
    } else {
        MouseGetPos,,,ID
        WinGetClass, winClass, ahk_id %ID%
        if (winClass <> "l1l1.ka")
            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
}

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.ka
    ;{
     ;   Send {%key%}
      ;  return
    ;}

    Critical, On
    betSize := readBetBox(ID)
   
    if (amount = "bb") or (amount = "sb")
        raiseSize := getBlind(ID, amount)
    ;Msgbox, raiseSize: %raiseSize%
        
    if (direction = "up")
        newBetSize := betSize + raiseSize
    else
        newBetSize := betSize - raiseSize
        
    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.ka
     ;   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.ka
     ;   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
    
    ;Traytip,, button ID: %ID%`nactOnActiveTable: %actOnActiveTable%
    if (ID = "") {
        if (key <> "")
            Send {%key%}
        return
    }
     
    if (actOnActiveTable <> 1) 
        WinActivate, ahk_id %ID%
    
    ;IfWinNotActive ahk_class l1l1.ka
    ;{
        ;TrayTip,, Sending %key%
        ;if (key <> "")
         ;   Send {%key%}
        ;return
    ;}
    
    WinGetActiveStats, title, width, height, ax, ay
    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, InstantAllIn,  EntHelper.ini, Options,  InstantAllIn, 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, percentage5, EntHelper.ini, PotPercentages, percentage5, 0
    IniRead, percentage6, EntHelper.ini, PotPercentages, percentage6, 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, BetPotPercentage5, EntHelper.ini, Hotkeys, BetPotPercentage5, %A_Space%
    IniRead, BetPotPercentage6, EntHelper.ini, Hotkeys, BetPotPercentage6, %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 := True
    allwaysCheckForFree := True
    autoBuyInMax := True
    autoConfirmRebuy := True
    autoConfirmAllIn := True
    autoConfirmLeave := True
    InstantAllIn := False
    
    ; set pot percentages
    percentage1 := 40
    percentage2 := 50
    percentage3 := 66
    percentage4 := 75
    percentage5 := 90
    percentage6 := 115
    
    ;set hotkeys
    Fold = NumpadHome
    CheckCall = NumpadUp
    Raise = NumpadPgUp
    
    BetPotPercentage1 = NumpadEnd
    BetPotPercentage2 = NumpadLeft
    BetPotPercentage3 = NumpadClear
    BetPotPercentage4 = NumpadRight
    BetPotPercentage5 = NumpadDown
    BetPotPercentage6 = 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 InstantAllIn
        IniWrite, %InstantAllIn%,  EntHelper.ini, Options,  InstantAllIn
    
    ; 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 percentage5
        IniWrite, %percentage5%, EntHelper.ini, PotPercentages, percentage5
    if percentage6
        IniWrite, %percentage6%, EntHelper.ini, PotPercentages, percentage6
    
    ; 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 BetPotPercentage5
        IniWrite, %BetPotPercentage5%, EntHelper.ini, Hotkeys, BetPotPercentage5
    if BetPotPercentage6
        IniWrite, %BetPotPercentage6%, EntHelper.ini, Hotkeys, BetPotPercentage6
        
    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 BetPotPercentage5
        HotKey, %BetPotPercentage5%, BetPotPercentage5
    if BetPotPercentage6
        HotKey, %BetPotPercentage6%, BetPotPercentage6
        
    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
}
New Donationware Software: Entraction helper script Quote
10-30-2009 , 05:22 PM
It shows the following error when i start it now.

Error: Missing "{"

line#
813: if sitout
814: iniwrite, %sitout%, enthelper, ini, hotkets, sitout
815, etc it goes on till 832
New Donationware Software: Entraction helper script Quote
10-30-2009 , 06:23 PM
Sorry to hear that. What Autohotkey are you using? It works fine for me with version 1.0.48.03
New Donationware Software: Entraction helper script Quote
11-01-2009 , 09:06 AM
Add 'FOLD' to right button mouse and TableHighlighter, please.

http://www.overcards.com/wiki/moin/T...yAutoHotKey%29
New Donationware Software: Entraction helper script Quote
11-01-2009 , 11:16 AM
I pasted it in a new document and it worked fine.
However pretty often i fold at the wrong table with the fold button because a new table becomes active at the wrong time.
Also i get the error message "76 hotkeys have been pressed in the last 63ms" very often.
all in all the software is pretty good tho
New Donationware Software: Entraction helper script Quote
11-01-2009 , 01:01 PM
Quote:
Originally Posted by ZARATUSTRA
Add 'FOLD' to right button mouse and TableHighlighter, please.

http://www.overcards.com/wiki/moin/T...yAutoHotKey%29
You can set the right mouse button to FOLD in the settings. Just write RButton for the Fold hotkey.
New Donationware Software: Entraction helper script Quote
11-01-2009 , 01:04 PM
Quote:
Originally Posted by Roelof-
I pasted it in a new document and it worked fine.
However pretty often i fold at the wrong table with the fold button because a new table becomes active at the wrong time.
Also i get the error message "76 hotkeys have been pressed in the last 63ms" very often.
all in all the software is pretty good tho
Yeah, tables becoming active in the wrong moment are a big problem. Unfortunatelly, it is the way the Entraction software behaves and I don't know of a way to prevent the tables from popping up...

About that hotkeys pressed message, I haven't received it ever. I only played a maximum of 4 tables at a time though. Try adding the following line after #NoEnv:

Code:
#MaxHotkeysPerInterval 200

Last edited by OSRichard; 11-01-2009 at 01:16 PM. Reason: added MaxHotkeysPerInterval
New Donationware Software: Entraction helper script Quote
11-01-2009 , 05:28 PM
Quote:
Originally Posted by OSRichard
You can set the right mouse button to FOLD in the settings. Just write RButton for the Fold hotkey.
Great!!! Thanks!!!
Add options: Auto press "I'm back" button, wen time is ended and TableHighlighter, please. Its very important for multitabling.

I will make donation!!!
New Donationware Software: Entraction helper script Quote
11-05-2009 , 06:47 AM
Quote:
Originally Posted by ZARATUSTRA
Great!!! Thanks!!!
Add options: Auto press "I'm back" button, wen time is ended and TableHighlighter, please. Its very important for multitabling.

I will make donation!!!
Any updates?
New Donationware Software: Entraction helper script Quote
11-05-2009 , 02:28 PM
I've been working on it a little. The problem is sending mouse clicks to Entraction tables that are in the background is proving somewhat difficult (the method used for PokerStars for example doesn't seem to work).
I'll put out a new version when I can figure this out.
New Donationware Software: Entraction helper script Quote
11-09-2009 , 09:33 AM
Many thanks for the effort man, i will donate something if this month ends good
New Donationware Software: Entraction helper script Quote
11-11-2009 , 03:26 PM
How about this: instead of adding all that code to my script, use this code for an Entraction plugin to the NoTitlebar script:

Code:
lobbyEntraction() {
SetTitleMatchMode 2
WinGet, id, id, ahk_class l1l1.xl
return id
}

tablesEntraction(lobby) {
SetTitleMatchMode 1
WinGet, pid, pid, ahk_id%lobby%
WinGet, list, list, ahk_class l1l1.ka
Loop % list
tables := list%a_index%!=lobby
? addToList(tables, list%a_index%)
: tables
return tables
}
I haven't tested this, just modified the code from your link, but I hope it will work.
New Donationware Software: Entraction helper script Quote
11-12-2009 , 02:29 AM
Quote:
Originally Posted by OSRichard
How about this: instead of adding all that code to my script, use this code for an Entraction plugin to the NoTitlebar script:

Code:
lobbyEntraction() {
SetTitleMatchMode 2
WinGet, id, id, ahk_class l1l1.xl
return id
}

tablesEntraction(lobby) {
SetTitleMatchMode 1
WinGet, pid, pid, ahk_id%lobby%
WinGet, list, list, ahk_class l1l1.ka
Loop % list
tables := list%a_index%!=lobby
? addToList(tables, list%a_index%)
: tables
return tables
}
I haven't tested this, just modified the code from your link, but I hope it will work.
Doesn't work for me on PokerSens
New Donationware Software: Entraction helper script Quote
12-02-2009 , 01:26 AM
Hi.

I've noticed the window class of poker tables has changed again, so here is an updated version:

Code:
; Version 0.3R2

; percentage of the window width and height for center of buttons
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.44

confirmBuyInX := 0.7
confirmBuyInY := 0.89

rebuyOkX := 0.49
rebuyOkY := 0.74

confirmAllInX := 0.41
confirmAllInY := 0.73

confirmLeaveX := 0.45
confirmLeaveY := 0.73
; End general settings

#SingleInstance, Force
#NoEnv
#MaxHotkeysPerInterval 200
SendMode Input
SetTitleMatchMode 3
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 (allwaysCheckForFree = 1)
    GoSub activateAllwaysCheckForFree

if (autoBuyInMax = 1)
    GoSub autoBuyInForMax
    
if (autoConfirmRebuy = 1)
    GoSub activateAutoConfirmRebuy
    
if (autoConfirmAllIn = 1)
    GoSub activateAutoConfirmAllIn
    
if (autoConfirmLeave = 1)
    GoSub activateAutoConfirmLeave

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, Text, x10 y152 w20 h20 , Bet
    Gui, Add, Edit, x90 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 y232 w20 h20 , Bet
    Gui, Add, Edit, x30 y230 w25 h20 vpercentage5, %percentage5%
    Gui, Add, Text, x56 y232 w40 h20 , `% pot
    Gui, Add, Edit, x90 y230 w90 h20 vBetPotPercentage5, %BetPotPercentage5%
    Gui, Add, Text, x10 y252 w20 h20 , Bet
    Gui, Add, Edit, x30 y250 w25 h20 vpercentage6, %percentage6%
    Gui, Add, Text, x56 y252 w40 h20 , `% pot
    Gui, Add, Edit, x90 y250 w90 h20 vBetPotPercentage6, %BetPotPercentage6%
    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, 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

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

BetPotPercentage5:
    bet(getTableID(), percentage5, BetPotPercentage5)
return

BetPotPercentage6:
    bet(getTableID(), percentage6, BetPotPercentage6)
return

BetFullPot:
    bet(getTableID(), 100, BetFullPot)
    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

About:
    Msgbox,, About,
    (
    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

RemoveToolTip:
    SetTimer, RemoveToolTip, Off
    ToolTip
return

activateAllwaysCheckForFree:
    SetTimer, checkForFree, 500
return

autoBuyInForMax:
    SetTimer, buyInForMax, 500
return

activateAutoConfirmRebuy:
    SetTimer, autoCloseRebuy, 500
return

activateAutoConfirmAllIn:
    SetTimer, autoConfirmLargeAllIn, 500
return

activateAutoConfirmLeave:
    SetTimer, autoConfirmLeaveTable, 500
return

checkForFree:
    checkForFreeWindowTitle := "Confirm fold"

    IfWinExist, %checkForFreeWindowTitle%
    {
        
        ; press "Check" button
        CoordMode, Mouse, Screen
        MouseGetPos, px, py
        CoordMode, Mouse, Relative
        WinGetActiveStats, title, width, height, ax, ay
        X := Round(width * checkForFreeX)
        Y := Round(height * checkForFreeY)
        ;Tooltip, title: %title%`nX: %X%`nY: %Y%`ncheckForFreeWindowTitle: %checkForFreeWindowTitle%
        ;SetTimer, RemoveToolTip, 5000
        MouseClick,, X, Y,, 0
        CoordMode, Mouse, Screen
        MouseMove, px, py, 0
        CoordMode, Mouse, Relative
    }
return

buyInForMax:
    IfWinExist, ahk_class SunAwtDialog
    {
        WinGetActiveStats, title, width, height, ax, ay
        if (title = "") {
            CoordMode, Mouse, Screen
            MouseGetPos, px, py
            CoordMode, Mouse, Relative
            X := Round(width * maxBuyInX)
            Y := Round(height * maxBuyInY)
            ;Tooltip, title: %title%`nX: %X%`nY: %Y%
            ;SetTimer, RemoveToolTip, 5000
            MouseClick,, X, Y,, 0
            sleep 50
            X := Round(width * confirmBuyInX)
            Y := Round(height * confirmBuyInY)
            MouseClick,, X, Y,, 0
            CoordMode, Mouse, Screen
            MouseMove, px, py, 0
            CoordMode, Mouse, Relative
        }
    }
return

autoCloseRebuy:
    autoCloseRebuyWindowTitle := "Auto Rebuy turned on"

    IfWinExist, %autoCloseRebuyWindowTitle%
    {
        ; press "Ok" button
        CoordMode, Mouse, Screen
        MouseGetPos, px, py
        CoordMode, Mouse, Relative
        WinGetActiveStats, title, width, height, ax, ay
        X := Round(width * rebuyOkX)
        Y := Round(height * rebuyOkY)
        ;Tooltip, title: %title%`nX: %X%`nY: %Y%`nautoCloseRebuyWindowTitle: %autoCloseRebuyWindowTitle%
        ;SetTimer, RemoveToolTip, 5000
        MouseClick,, X, Y,, 0
        CoordMode, Mouse, Screen
        MouseMove, px, py, 0
        CoordMode, Mouse, Relative
    }
return

autoConfirmLargeAllIn:
    autoConfirmLargeAllInWindowTitle := "Confirm Large All-In Raise"

    IfWinExist, %autoConfirmLargeAllInWindowTitle%
    {
        ; press "Ok" button
        CoordMode, Mouse, Screen
        MouseGetPos, px, py
        CoordMode, Mouse, Relative
        WinGetActiveStats, title, width, height, ax, ay
        X := Round(width * confirmAllInX)
        Y := Round(height * confirmAllInY)
        ;Tooltip, title: %title%`nX: %X%`nY: %Y%`nautoConfirmLargeAllInWindowTitle: %autoConfirmLargeAllInWindowTitle%
        ;SetTimer, RemoveToolTip, 5000
        MouseClick,, X, Y,, 0
        CoordMode, Mouse, Screen
        MouseMove, px, py, 0
        CoordMode, Mouse, Relative
    }
return

autoConfirmLeaveTable:
    autoConfirmLeaveTableWindowTitle := "Confirm leave"

    IfWinExist, %autoConfirmLeaveTableWindowTitle%
    {
        ; press "Ok" button
        CoordMode, Mouse, Screen
        MouseGetPos, px, py
        CoordMode, Mouse, Relative
        WinGetActiveStats, title, width, height, ax, ay
        X := Round(width * confirmLeaveX)
        Y := Round(height * confirmLeaveY)
        ;Tooltip, title: %title%`nX: %X%`nY: %Y%`nautoConfirmLeaveTableWindowTitle: %autoConfirmLeaveTableWindowTitle%
        ;SetTimer, RemoveToolTip, 5000
        MouseClick,, X, Y,, 0
        CoordMode, Mouse, Screen
        MouseMove, px, py, 0
        CoordMode, Mouse, Relative
    }
return

getTableID()
{
    global actOnActiveTable
  
    ID := ""
    if (actOnActiveTable = 1) {
        WinGet, ID,, A 
    } else {
        MouseGetPos,,,ID
        WinGetClass, winClass, ahk_id %ID%
        if (winClass <> "l1l1.kf")
            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
}

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.kf
    ;{
     ;   Send {%key%}
      ;  return
    ;}

    Critical, On
    betSize := readBetBox(ID)
   
    if (amount = "bb") or (amount = "sb")
        raiseSize := getBlind(ID, amount)
    ;Msgbox, raiseSize: %raiseSize%
        
    if (direction = "up")
        newBetSize := betSize + raiseSize
    else
        newBetSize := betSize - raiseSize
        
    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.kf
     ;   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.kf
     ;   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
    
    ;Traytip,, button ID: %ID%`nactOnActiveTable: %actOnActiveTable%
    if (ID = "") {
        if (key <> "")
            Send {%key%}
        return
    }
     
    if (actOnActiveTable <> 1) 
        WinActivate, ahk_id %ID%
    
    ;IfWinNotActive ahk_class l1l1.kf
    ;{
        ;TrayTip,, Sending %key%
        ;if (key <> "")
         ;   Send {%key%}
        ;return
    ;}
    
    WinGetActiveStats, title, width, height, ax, ay
    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, InstantAllIn,  EntHelper.ini, Options,  InstantAllIn, 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, percentage5, EntHelper.ini, PotPercentages, percentage5, 0
    IniRead, percentage6, EntHelper.ini, PotPercentages, percentage6, 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, BetPotPercentage5, EntHelper.ini, Hotkeys, BetPotPercentage5, %A_Space%
    IniRead, BetPotPercentage6, EntHelper.ini, Hotkeys, BetPotPercentage6, %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 := True
    allwaysCheckForFree := True
    autoBuyInMax := True
    autoConfirmRebuy := True
    autoConfirmAllIn := True
    autoConfirmLeave := True
    InstantAllIn := False
    
    ; set pot percentages
    percentage1 := 40
    percentage2 := 50
    percentage3 := 66
    percentage4 := 75
    percentage5 := 90
    percentage6 := 115
    
    ;set hotkeys
    Fold = NumpadHome
    CheckCall = NumpadUp
    Raise = NumpadPgUp
    
    BetPotPercentage1 = NumpadEnd
    BetPotPercentage2 = NumpadLeft
    BetPotPercentage3 = NumpadClear
    BetPotPercentage4 = NumpadRight
    BetPotPercentage5 = NumpadDown
    BetPotPercentage6 = 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 InstantAllIn
        IniWrite, %InstantAllIn%,  EntHelper.ini, Options,  InstantAllIn
    
    ; 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 percentage5
        IniWrite, %percentage5%, EntHelper.ini, PotPercentages, percentage5
    if percentage6
        IniWrite, %percentage6%, EntHelper.ini, PotPercentages, percentage6
    
    ; 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 BetPotPercentage5
        IniWrite, %BetPotPercentage5%, EntHelper.ini, Hotkeys, BetPotPercentage5
    if BetPotPercentage6
        IniWrite, %BetPotPercentage6%, EntHelper.ini, Hotkeys, BetPotPercentage6
        
    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 BetPotPercentage5
        HotKey, %BetPotPercentage5%, BetPotPercentage5
    if BetPotPercentage6
        HotKey, %BetPotPercentage6%, BetPotPercentage6
        
    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
}
New Donationware Software: Entraction helper script Quote
12-04-2009 , 07:45 AM
Hi Richard,

tanks for the script. it makes it a lot easier to play at NoIQ.

cloud you please add "auto-ok" functionality for all the waitinglist pop-ups and two hotkeys for fixed bet amounts preflop?
New Donationware Software: Entraction helper script Quote
12-04-2009 , 02:51 PM
Hi.

Ok, I'll add auto-ok for waiting list pop-ups. I hope to have a new version in a few days.

I'm not sure what you mean by hotkeys for fixed bet amounts preflop. There allready are several pot percentage hotkeys, which can be applied to every street, not just preflop. Are these not enough? Please play with the settings a little and see if they do what you want. You can access the settings by right-clicking the white-on-green "H" icon in your system tray and selecting "Settings"
New Donationware Software: Entraction helper script Quote
12-05-2009 , 03:42 AM
Thanks for adding the waiting list automation. that will really be a big help

regarding the two hotkey: i want to be able to press hotkey1 for an exact openraise of 3bb and hotkey2 for an exact openraise of 2.5bb. is that already possible? instead of adding two new hotkeys it might be easier to tell me how i have to edit the script, so that my fixed betting amounts will be assinged to the existing betpot% hotkeys.
New Donationware Software: Entraction helper script Quote
12-05-2009 , 10:45 PM
As I soon will start to play at NOIQ, I will be using this script. A donation will be added after testing it out.
New Donationware Software: Entraction helper script Quote
12-06-2009 , 06:54 PM
Btw, any progress on the issue to be able to hold the queue on the table that needs action? So that it doesn't disappear into the stack and timing out? Is this even possible?

If this is possible to get sorted, I'm willing to put in a pretty good donation.

Cheers,
New Donationware Software: Entraction helper script Quote
12-07-2009 , 01:11 PM
I haven't managed to find a satisfactory solution for the issue of holding the table needing action in front. I think the only way this will be resolved is by Entraction themselves changing their software, not with ahk scripting. Sorry.
New Donationware Software: Entraction helper script Quote
12-07-2009 , 02:27 PM
Quote:
Originally Posted by nutsbuster
Thanks for adding the waiting list automation. that will really be a big help

regarding the two hotkey: i want to be able to press hotkey1 for an exact openraise of 3bb and hotkey2 for an exact openraise of 2.5bb. is that already possible? instead of adding two new hotkeys it might be easier to tell me how i have to edit the script, so that my fixed betting amounts will be assinged to the existing betpot% hotkeys.
Alright, here is a new version of the script. I converted two of the pot percentage buttons to xBB buttons and handled the two waiting lists pop-ups (when signing onto the waiting list and when the seat is emptied on the table).

Code:
; Version 0.3R3

; percentage of the window width and height for center of buttons
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.44

confirmBuyInX := 0.7
confirmBuyInY := 0.89

rebuyOkX := 0.49
rebuyOkY := 0.74

confirmAllInX := 0.41
confirmAllInY := 0.73

confirmLeaveX := 0.45
confirmLeaveY := 0.73

confirmWaiting1X := 0.5
confirmWaiting1Y := 0.86

confirmWaiting2X := 0.41
confirmWaiting2Y := 0.86
; End general settings

#SingleInstance, Force
#NoEnv
#MaxHotkeysPerInterval 200
SendMode Input
SetTitleMatchMode 3
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 (allwaysCheckForFree = 1)
    GoSub activateAllwaysCheckForFree

if (autoBuyInMax = 1)
    GoSub autoBuyInForMax
    
if (autoConfirmRebuy = 1)
    GoSub activateAutoConfirmRebuy
    
if (autoConfirmAllIn = 1)
    GoSub activateAutoConfirmAllIn
    
if (autoConfirmLeave = 1)
    GoSub activateAutoConfirmLeave
     
if (autoConfirmWaitingList = 1)
    GoSub activateAutoConfirmWaitingList

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 y130 w200 h20 Checked%autoConfirmWaitingList% vautoConfirmWaitingList, Auto confirm waiting list pop-ups
    
    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

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

About:
    Msgbox,, About,
    (
    Entraction Helper, v0.3R3
    
    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

RemoveToolTip:
    SetTimer, RemoveToolTip, Off
    ToolTip
return

activateAllwaysCheckForFree:
    SetTimer, checkForFree, 500
return

autoBuyInForMax:
    SetTimer, buyInForMax, 500
return

activateAutoConfirmRebuy:
    SetTimer, autoCloseRebuy, 500
return

activateAutoConfirmAllIn:
    SetTimer, autoConfirmLargeAllIn, 500
return

activateAutoConfirmLeave:
    SetTimer, autoConfirmLeaveTable, 500
return

activateAutoConfirmWaitingList:
    SetTimer, autoConfirmWaitingListPp, 500
return

checkForFree:
    checkForFreeWindowTitle := "Confirm fold"

    IfWinExist, %checkForFreeWindowTitle%
    {
        
        ; press "Check" button
        CoordMode, Mouse, Screen
        MouseGetPos, px, py
        CoordMode, Mouse, Relative
        WinGetActiveStats, title, width, height, ax, ay
        X := Round(width * checkForFreeX)
        Y := Round(height * checkForFreeY)
        ;Tooltip, title: %title%`nX: %X%`nY: %Y%`ncheckForFreeWindowTitle: %checkForFreeWindowTitle%
        ;SetTimer, RemoveToolTip, 5000
        MouseClick,, X, Y,, 0
        CoordMode, Mouse, Screen
        MouseMove, px, py, 0
        CoordMode, Mouse, Relative
    }
return

buyInForMax:
    IfWinExist, ahk_class SunAwtDialog
    {
        WinGetActiveStats, title, width, height, ax, ay
        if (title = "") {
            CoordMode, Mouse, Screen
            MouseGetPos, px, py
            CoordMode, Mouse, Relative
            X := Round(width * maxBuyInX)
            Y := Round(height * maxBuyInY)
            ;Tooltip, title: %title%`nX: %X%`nY: %Y%
            ;SetTimer, RemoveToolTip, 5000
            MouseClick,, X, Y,, 0
            sleep 50
            X := Round(width * confirmBuyInX)
            Y := Round(height * confirmBuyInY)
            MouseClick,, X, Y,, 0
            CoordMode, Mouse, Screen
            MouseMove, px, py, 0
            CoordMode, Mouse, Relative
        }
    }
return

autoCloseRebuy:
    autoCloseRebuyWindowTitle := "Auto Rebuy turned on"

    IfWinExist, %autoCloseRebuyWindowTitle%
    {
        ; press "Ok" button
        CoordMode, Mouse, Screen
        MouseGetPos, px, py
        CoordMode, Mouse, Relative
        WinGetActiveStats, title, width, height, ax, ay
        X := Round(width * rebuyOkX)
        Y := Round(height * rebuyOkY)
        ;Tooltip, title: %title%`nX: %X%`nY: %Y%`nautoCloseRebuyWindowTitle: %autoCloseRebuyWindowTitle%
        ;SetTimer, RemoveToolTip, 5000
        MouseClick,, X, Y,, 0
        CoordMode, Mouse, Screen
        MouseMove, px, py, 0
        CoordMode, Mouse, Relative
    }
return

autoConfirmLargeAllIn:
    autoConfirmLargeAllInWindowTitle := "Confirm Large All-In Raise"

    IfWinExist, %autoConfirmLargeAllInWindowTitle%
    {
        ; press "Ok" button
        CoordMode, Mouse, Screen
        MouseGetPos, px, py
        CoordMode, Mouse, Relative
        WinGetActiveStats, title, width, height, ax, ay
        X := Round(width * confirmAllInX)
        Y := Round(height * confirmAllInY)
        ;Tooltip, title: %title%`nX: %X%`nY: %Y%`nautoConfirmLargeAllInWindowTitle: %autoConfirmLargeAllInWindowTitle%
        ;SetTimer, RemoveToolTip, 5000
        MouseClick,, X, Y,, 0
        CoordMode, Mouse, Screen
        MouseMove, px, py, 0
        CoordMode, Mouse, Relative
    }
return

autoConfirmLeaveTable:
    autoConfirmLeaveTableWindowTitle := "Confirm leave"

    IfWinExist, %autoConfirmLeaveTableWindowTitle%
    {
        ; press "Ok" button
        CoordMode, Mouse, Screen
        MouseGetPos, px, py
        CoordMode, Mouse, Relative
        WinGetActiveStats, title, width, height, ax, ay
        X := Round(width * confirmLeaveX)
        Y := Round(height * confirmLeaveY)
        ;Tooltip, title: %title%`nX: %X%`nY: %Y%`nautoConfirmLeaveTableWindowTitle: %autoConfirmLeaveTableWindowTitle%
        ;SetTimer, RemoveToolTip, 5000
        MouseClick,, X, Y,, 0
        CoordMode, Mouse, Screen
        MouseMove, px, py, 0
        CoordMode, Mouse, Relative
    }
return

autoConfirmWaitingListPp:
    autoConfirmWaitingListWindowTitle := "Waiting List"

    IfWinExist, %autoConfirmWaitingListWindowTitle%
    {
        WinActivate, %autoConfirmWaitingListWindowTitle%
        
        ; press "Ok" button
        CoordMode, Mouse, Screen
        MouseGetPos, px, py
        CoordMode, Mouse, Relative
        WinGetActiveStats, title, width, height, ax, ay
        
        X := Round(width * confirmWaiting1X)
        Y := Round(height * confirmWaiting1Y)
        ;Tooltip, title: %title%`nX: %X%`nY: %Y%`nautoConfirmWaitingListWindowTitle: %autoConfirmWaitingListWindowTitle%
        ;SetTimer, RemoveToolTip, 5000
        MouseClick,, X, Y,, 0
        
        X := Round(width * confirmWaiting2X)
        Y := Round(height * confirmWaiting2Y)
        ;Tooltip, title: %title%`nX: %X%`nY: %Y%`nautoConfirmWaitingListWindowTitle: %autoConfirmWaitingListWindowTitle%
        ;SetTimer, RemoveToolTip, 5000
        MouseClick,, X, Y,, 0
        
        CoordMode, Mouse, Screen
        MouseMove, px, py, 0
        CoordMode, Mouse, Relative
    }
return

getTableID()
{
    global actOnActiveTable
  
    ID := ""
    if (actOnActiveTable = 1) {
        WinGet, ID,, A 
    } else {
        MouseGetPos,,,ID
    }
    
    WinGetClass, winClass, ahk_id %ID%
    if (winClass <> "l1l1.kf")
        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.kf
    ;{
     ;   Send {%key%}
      ;  return
    ;}

    Critical, On
    betSize := readBetBox(ID)
   
    if (amount = "bb") or (amount = "sb")
        raiseSize := getBlind(ID, amount)
    ;Msgbox, raiseSize: %raiseSize%
        
    if (direction = "up")
        newBetSize := betSize + raiseSize
    else
        newBetSize := betSize - raiseSize
        
    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.kf
     ;   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.kf
     ;   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
    
    ;Traytip,, button ID: %ID%`nactOnActiveTable: %actOnActiveTable%
    if (ID = "") {
        if (key <> "")
            Send {%key%}
        return
    }
     
    if (actOnActiveTable <> 1) 
        WinActivate, ahk_id %ID%
    
    ;IfWinNotActive ahk_class l1l1.kf
    ;{
        ;TrayTip,, Sending %key%
        ;if (key <> "")
         ;   Send {%key%}
        ;return
    ;}
    
    WinGetActiveStats, title, width, height, ax, ay
    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, 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 := True
    allwaysCheckForFree := True
    autoBuyInMax := True
    autoConfirmRebuy := True
    autoConfirmAllIn := True
    autoConfirmLeave := True
    autoConfirmWaitingList := 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 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
}
When upgrating to this version, please check again your settings to see if every setting is as desired (on "Table Hotkeys" and "Options" tabs)

Enjoy

Last edited by OSRichard; 12-07-2009 at 02:32 PM.
New Donationware Software: Entraction helper script Quote
12-08-2009 , 04:37 AM
Thanks a lot ))

I have a little problem though. its not possible to activate the waitinglist option under the Options-Tab. If i click on Options i can see "Auto confirm waiting list pop-ups", but not " Auto confirm leave table pop-up". When i try to click the waiting list checkbox the "waiting list" entry disappears and the "leave table pop-up" option appears instead.
New Donationware Software: Entraction helper script Quote

      
m