Note - this script only works with game windows that are the original default size. I hope to have an update soon that will allow this to function with the new resizable windows.

I like to multi-table on Pokerstars using this Logitech Dual Action Gamepad ($20 at Walmart, Best Buy etc)

http://www.logitech.com/index.cfm/products/details/US/EN,CRID=2225,CONTENTID=6951

Here is an autohotkey script I wrote for complete mouseless poker.

Open up to 4 tables and put each window in a corner of your screen. More windows can be open but only the ones in the 4 corners will be selected using the gamepad. I usually leave a web page open in one corner so I can easily surf while playing.

The gamepad buttons will do the following -

The direction pad will say 4 different chat messages.

The bottom left joystick left/right axis will move the NL slider betting amount, while pushing it up/down will scroll through a document.

The bottom right joystick provides a second way to select the 4 game windows.

At the top of the script its easy to modify your screen dimensions, the 4 chat messages and predefined NL bet amounts you want to use. The bet_on variable can be set to determine how gamepad buttons 5-8 function.

Perhaps someone will find this useful. Good Luck...

ahub64@cardplayer.com



; AutoHotKey script for PokerStars using a Logitech Dual Action Gamepad
; Hopefully this is easy to read and modify for other gamepads and poker sites


screenwide = 1280  ;  right click desktop, click Settings to get screen dimensions
screentall = 800

tchat = ty  ; predefined chat messages for top left direction pad
rchat = nh
lchat = vnh
bchat = nice suck

bet5 = 4    ; NL bet amounts for buttons 5-8 on the gamepad and F keys 5-8 on keyboard
bet6 = 6    
bet7 = 10
bet8 = 9999 ;  make bet8 big enough and you'll go all-in.  
            ;  bet8 also makes you press Bet button to confirm (other 3 are automatic)

bet_on = 1  ; if = 0  then buttons 5-8 navigate to different 4 different corners
            ;         same as bottom right joystick 
            ; if = 1  then buttons 5-8 will bet NL amounts defined above

snum = 100  ; the AHK sleep time (in ms) after each action and loop cycle
            ; Can adjust to change performance, cpu usage

site = 2    ; 1 = pokerstars default window size  2 = stars smallest window size

Process, Priority, , High

if site = 1
{
  fold1 = 450
  fold2 = 510
  fold3 = 530
  call1 = 600
  call2 = 530
  call3 = 510
  bet1 = 680
  bet2 = 530
  nlwin1 = 635
  nlwin2 = 480
  t0 = 2
  tl1 = 75
  tr1 = 105
  bl1 = 50
  br1 = 50
  nlrb1 = 410
  nlrb2 = 80
  nlrb3 = 250
  nlrb4 = 50
  nlrb5 = 90
  nlrb6 = 230
  nlrb7 = 100
  nlrb8 = 430
  nlrb9 = 180
  nlrb10 = 100
  ap1 = 15
  ap2 = 422
  cb1 = 15
  cb2 = 474
  slidel1 = 685
  slidel2 = 480
  slider1 = 775
  slider2 = 480
  edge = 5
}
else if site = 2
{
  fold1 = 260
  fold2 = 315
  fold3 = 330
  call1 = 340
  call2 = 330
  call3 = 315
  bet1 = 420
  bet2 = 330
  nlwin1 = 380
  nlwin2 = 300
  t0 = 2
  tl1 = 75
  tr1 = 105
  bl1 = 50
  br1 = 50
  nlrb1 = 240
  nlrb2 = 60
  nlrb3 = 270
  nlrb4 = 50
  nlrb5 = 90
  nlrb6 = 230
  nlrb7 = 100
  nlrb8 = 430
  nlrb9 = 180
  nlrb10 = 100
  ap1 = 15
  ap2 = 268
  cb1 = 15
  cb2 = 300
  slidel1 = 410
  slidel2 = 300
  slider1 = 470
  slider2 = 300
  edge = 5
}


; Auto-detect the joystick number

if JoystickNumber <= 0
{
        Loop 32  ; Query each joystick number to find out which ones exist.
        {
                GetKeyState, JoyName, %A_Index%JoyName
                if JoyName <>
                {
                        JoystickNumber = %A_Index%
                        break
                }
        }
        if JoystickNumber <= 0
        {
                MsgBox The system does not appear to have any joysticks.
                ExitApp
        }
}

GetKeyState, joy_buttons, %JoystickNumber%JoyButtons
GetKeyState, joy_info, %JoystickNumber%JoyInfo

; the big loop that never ends

Loop
{
        buttons_down =
        Loop, %joy_buttons%
        {
                GetKeyState, joy%a_index%, %JoystickNumber%joy%a_index%
                if joy%a_index% = D
                        buttons_down = B%a_index%#
        }
        GetKeyState, joyx, %JoystickNumber%JoyX
        axis_info = X%joyx%
        xnum = %joyx%
        GetKeyState, joyy, %JoystickNumber%JoyY
        ynum = %joyy%
        IfInString, joy_info, Z
        {
                GetKeyState, joyz, %JoystickNumber%JoyZ
                znum = %joyz%
        }
        IfInString, joy_info, R
        {
                GetKeyState, joyr, %JoystickNumber%JoyR
                rnum = %joyr%
        }
        IfInString, joy_info, U
        {
                GetKeyState, joyu, %JoystickNumber%JoyU
                unum = %joyu%
        }
        IfInString, joy_info, V
        {
                GetKeyState, joyv, %JoystickNumber%JoyV
                vnum = %joyv%
        }
        IfInString, joy_info, P
        {
                GetKeyState, joyp, %JoystickNumber%JoyPOV
                pnum = %joyp%
        }

; function keys

        GetKeyState, stateF2, F2, P ; Fold
        if stateF2 = D ;
        {
            Coordmode, Mouse, Relative
            MouseClick, left, fold1, fold2
            MouseClick, left, fold1, fold3
            sleep, snum
        } 
        GetKeyState, stateF3, F3, P ; Check/Call
        if stateF3 = D ;
        {
            Coordmode, Mouse, Relative
            MouseClick, left, call1, call2
            MouseClick, left, call1, call3
            sleep, snum
        } 
        GetKeyState, stateF4, F4, P ; Bet/Raise
        if stateF4 = D ;
        {
            Coordmode, Mouse, Relative
            MouseClick, left, bet1, bet2
            sleep, snum
        } 
        GetKeyState, stateF5, F5, P ; bet #5
        if stateF5 = D ;
        {
            Coordmode, Mouse, Relative
            MouseClick, left, nlwin1, nlwin2
            Send {DEL 8} 
            Send %bet5%{Enter}
            sleep, snum
        } 
        GetKeyState, stateF6, F6, P ; bet #6
        if stateF6 = D ;
        {
            Coordmode, Mouse, Relative
            MouseClick, left, nlwin1, nlwin2
            Send {DEL 8} 
            Send %bet6%{Enter}
            sleep, snum
        } 
        GetKeyState, stateF7, F7, P ; bet #7
        if stateF7 = D ;
        {
            Coordmode, Mouse, Relative
            MouseClick, left, nlwin1, nlwin2
            Send {DEL 8} 
            Send %bet7%{Enter}
            sleep, snum
        } 
        GetKeyState, stateF8, F8, P ; bet #8
        if stateF8 = D ;
        {
            Coordmode, Mouse, Relative
            MouseClick, left, nlwin1, nlwin2
            Send {DEL 8} 
            Send %bet8%
            sleep, snum
        } 
        GetKeyState, stateF9, F9, P ; NL Rebuy
        if stateF9 = D ;
        {
            Coordmode, Mouse, Relative
            MouseClick, left, nlrb1, nlrb2
            sleep, 400
            MouseClick, left, nlrb3, nlrb4
            Sleep, 400
            MouseClick, left, nlrb5, nlrb6
            MouseClick, left, nlrb7, nlrb8
            Sleep, 400
            MouseClick, left, nlrb9, nlrb10
            sleep, snum
        } 
        GetKeyState, stateF10, F10, P ; auto-post blinds
        if stateF10 = D ;
        {
            Coordmode, Mouse, Relative
            MouseClick, left, ap1, ap2
            sleep, snum
        } 
        GetKeyState, stateF11, F11, P ; clear NL bet amt
        if stateF11 = D ;
        {
            Coordmode, Mouse, Relative
            MouseClick, left, nlwin1, nlwin2
            Send {DEL 8} 
            sleep, snum
        } 

; gamepad buttons

        If buttons_down = B1# ;  Fold
        {
            Coordmode, Mouse, Relative
            MouseClick, left, fold1, fold2
            MouseClick, left, fold1, fold3
            sleep, snum
        }
        else if buttons_down = B2# ;  Check/Call
        {
            Coordmode, Mouse, Relative
            MouseClick, left, call1, call2
            MouseClick, left, call1, call3
            sleep, snum
        }
        else if buttons_down = B3# ;  Bet/Raise
        {
            Coordmode, Mouse, Relative
            MouseClick, left, bet1, bet2
            sleep, snum
        }
        else if buttons_down = B4# ;  Clear NL Bet Amount
        {
            Coordmode, Mouse, Relative
            MouseClick, left, nlwin1, nlwin2
            Send {DEL 8} 
            sleep, snum
        }
        else if buttons_down = B5# ;  Top Left
        {
            if bet_on = 0 ;
            {
                Coordmode, Mouse, Screen
                MouseClick, left, edge, tl1, t0
                sleep, snum
            }
            else if bet_on = 1 ;
            {
                Coordmode, Mouse, Relative
                MouseClick, left, nlwin1, nlwin2
                Send {DEL 8} 
                Send %bet5%{Enter}
                sleep, snum
            } 
        }
        else if buttons_down = B6# ;  Top Right
        {
            if bet_on = 0 ;
            {
                Coordmode, Mouse, Screen
                MouseClick, left, screenwide-edge, tr1, t0
                sleep, snum
            }
            else if bet_on = 1 ;
            {
                Coordmode, Mouse, Relative
                MouseClick, left, nlwin1, nlwin2
                Send {DEL 8} 
                Send %bet6%{Enter}
                sleep, snum
            } 
        }
        else if buttons_down = B7# ;  Bottom Left
        {
            if bet_on = 0 ;
            {
                Coordmode, Mouse, Screen
                MouseClick, left, edge, screentall-bl1, t0
                sleep, snum
            }
            else if bet_on = 1 ;
            {
                Coordmode, Mouse, Relative
                MouseClick, left, nlwin1, nlwin2
                Send {DEL 8} 
                Send %bet7%{Enter}
                sleep, snum
            } 
        }
        else if buttons_down = B8# ;  Bottom Right
        {
            if bet_on = 0 ;
            {
                Coordmode, Mouse, Screen
                MouseClick, left, screenwide-edge, screentall-br1, t0
                sleep, snum
            }
            else if bet_on = 1 ;
            {
                Coordmode, Mouse, Relative
                MouseClick, left, nlwin1, nlwin2
                Send {DEL 8} 
                Send %bet8%
                sleep, snum
            } 
        }
        else if buttons_down = B9# ;  NL Rebuy
        {
            Coordmode, Mouse, Relative
            MouseClick, left, nlrb1, nlrb2
            sleep, 400
            MouseClick, left, nlrb3, nlrb4
            Sleep, 400
            MouseClick, left, nlrb5, nlrb6
            MouseClick, left, nlrb7, nlrb8
            Sleep, 400
            MouseClick, left, nlrb9, nlrb10
            sleep, snum
        }
        else if buttons_down = B10# ;  Auto-post Blinds
        {
            Coordmode, Mouse, Relative
            MouseClick, left, ap1, ap2
            sleep, snum
        }
        else if buttons_down = B11# ;  Switch Apps
        {
            Send, {ALTDOWN}{SHIFTDOWN}{TAB}{ALTUP}{SHIFTUP}
            sleep, snum
        }
        else if buttons_down = B12# ;  Switch Apps
        {
            Send, {ALTDOWN}{TAB}{ALTUP}
            sleep, snum
        }

; bottom right joystick for window selection

        else If (znum < 30) and (rnum < 30)  ;  top left
        {
            Coordmode, Mouse, Screen
            MouseClick, left, edge, tl1, t0
            sleep, snum
        }
        else If (znum > 40 and znum < 60) and (rnum < 30)  ;  top middle
        {
            Coordmode, Mouse, Screen
            MouseClick, left, screenwide / 2, tl1, t0
            sleep, snum
        }
        else If (znum > 70) and (rnum < 30)  ;  top right
        {
            Coordmode, Mouse, Screen
            MouseClick, left, screenwide-edge, tr1, t0
            sleep, snum
        }
        else If (znum < 30) and (rnum > 40 and rnum < 60)  ;  middle left
        {
            Coordmode, Mouse, Screen
            MouseClick, left, edge, screentall / 2, t0
            sleep, snum
        }
        else If (znum > 70) and (rnum > 40 and rnum < 60)  ;  middle right
        {
            Coordmode, Mouse, Screen
            MouseClick, left, screenwide - edge, screentall / 2, t0
            sleep, snum
        }
        else If (znum < 30) and (rnum > 70)  ;  bottom left
        {
            Coordmode, Mouse, Screen
            MouseClick, left, edge, screentall-bl1, t0
            sleep, snum
        }
        else If (znum > 40 and znum < 60) and (rnum > 70)  ;  bottom middle
        {
            Coordmode, Mouse, Screen
            MouseClick, left, screenwide / 2, screentall-bl1, t0
            sleep, snum
        }
        else If (znum > 70) and (rnum > 70)  ;  bottom right
        {
            Coordmode, Mouse, Screen
            MouseClick, left, screenwide-edge, screentall-br1, t0
            sleep, snum
        }

; top left direction pad for chat

        else If pnum = 0  ;  top
        {
            Coordmode, Mouse, Relative
            MouseClick, left, cb1, cb2
            MouseClick, left, cb1, cb2
            Send {DEL 12} 
            Send %tchat%{Enter}
            sleep, snum
        }
        else If pnum = 9000  ;  right
        {
            Coordmode, Mouse, Relative
            MouseClick, left, cb1, cb2
            MouseClick, left, cb1, cb2
            Send {DEL 12} 
            Send %rchat%{Enter}
            sleep, snum
        }
        else If pnum = 18000  ;  bottom
        {
            Coordmode, Mouse, Relative
            MouseClick, left, cb1, cb2
            MouseClick, left, cb1, cb2
            Send {DEL 12} 
            Send %bchat%{Enter}
            sleep, snum
        }
        else If pnum = 27000  ;  left
        {
            Coordmode, Mouse, Relative
            MouseClick, left, cb1, cb2
            MouseClick, left, cb1, cb2
            Send {DEL 12} 
            Send %lchat%{Enter}
            sleep, snum
        }

; bottom left joystick  up/down for scrolling (ie web browsing), left/right for NL slider

        else if ynum < 30 ; scroll up
        {
            Send {PgUp}
            sleep, snum
        }
        else if ynum > 70 ; scroll down
        {
            Send {PgDn}
            sleep, snum
        }
        else If xnum < 30 ; NL slider left
        {
            Coordmode, Mouse, Relative
            MouseClick, left, slidel1, slidel2
            sleep, snum
        }
        else If xnum > 70 ; NL slider right
        {
            Coordmode, Mouse, Relative
            MouseClick, left, slider1, slider2
            sleep, snum
        }

sleep, snum

} ; the end of the big loop

return

; The End.  not bad eh?  7/14/2006

StarsGamepad (last edited 2008-12-29 01:17:35 by MogobuTheFool)