Multitabling on WPN (America’s Cardroom) with a Controller

Here’s a demo of me using this setup while playing around 41 tables.

People have emailed and PM’d me about getting this setup for a couple years now, wanting to pay me, etc. I’ve never done it. Now…here it is for everyone—free of charge. It will likely be a while before I masstable again. I don’t wish to sell this because I don’t want to support it. I’m sure the code could be more efficient, etc. Getting it to work on your setup will take some time and patience. I’m sure I have a couple weeks work in getting this setup just right.

I doubt I’ll respond to inquiries; I’m sure you can get help in poker forums, etc. Anyway, this is the setup I use to play 45+ tables on Americas Cardroom. You can use it to put it more relaxing sessions. Also, you can grind mass tables for the Beast and rakeback.

  • Controller
  • Monitors
  • Furniture
  • Table Management
  • Script
  • Configuration / Manual
  • 1. Controller: You can use any controller that will connect to your PC. You want to make sure there are enough buttons. Otherwise, you may struggle to find sufficient combinations to do what you want. I use the Logitech Gamepad. I’ve used other controllers, but this one is my favorite, and it’s durable. If you can spare the extra cash, go for a wireless controller. When you get used to the setup, you can put in massive volume in a relaxed, laid back position. On the flip side, I also use to masstable while riding an exercise bike. A cord in the way is restrictive. This isn’t the time to pinch pennies. You’ll press these buttons hundreds of thousands of time; cheap controllers wear out quick and misclicks are a result. I also purchased an identical second controller to have on hand if the first ever broke. In a similar vein, I always had back-up batteries at my desk. When the controller isn’t responding well, that’s typically the problem.

    Once you get the controller cord plugged into your machine, you can go through the configuration setup on your computer.

    2. Monitors: I used two monitors. The first monitor is a 32” monitor. This is the minimum size I’d work with; would have liked a bigger one really. Why so big? This monitor is where you’ll play the tables. I use a HUD, so you don’t want minuscule numbers on the monitor wearing out your eyes. You’ll have four tables tiled on this monitor. The large size also allows you to get in a relaxed position without leaning forward to see the details. Actually, I used a 32” TV (like $250) for this one and saved a lot of cash over buying a 32” monitor (> $1k). It took some tweaking to get the text on the TV to look good, but it worked well.

    The second monitor I used a 17” monitor. Really, about any size would work. I used a 15” for a while before it died. This monitor is the location for Americas Cardroom lobby and a couple of workhorse grid slots for table management (more on this later).

    3. Furniture: If you’re looking to do some serious grinding, you must be comfortable. Sessions over 17 hours were routine for me. Spend the money to get a comfortable chair and a desk that puts your monitors at eye level. I also got a few special pillows for my neck. Not going to spend more time here. Get comfy.

    4. Table Management: I always wanted to take the time to write my own code for table management, but never found the time. I use StackAndTile (SaT). Unfortunately, it’s a monthly subscription (currently $18/month for the full version, and $9 a month for the small stakes version). SaT alone (w/o the rest of this setup) will likely help you impressively increase your volume. You’ll have to go through the instructions to learn how to use SaT on their website, but here are my settings.:

    Play Mode: Stack And Tile
    Move to Grid: When action required
    Total Grid Slots: 6
    Grid Visualization:

    GridLayout

    Hot Keys:

    HotKey1

    HotKey2

    5. Script: Here’s the tough part for those of us who aren’t programmers. The main purpose of the script is to facilitate the interaction between your controller and SaT. I also used the Script to close unwanted pops and get on waiting lists on Americas Cardroom client (using mouse buttons). I use Autohotkey. If you’ve never used autohokey, you’ll need to step through some tutorials and such; prepare to be tenacious… You’ll find much help in autohotkey forums and the help files online.

    There are a few pieces to using the script. When I paste code in this blog, I’ll surround the code in asterisks. The asterisks are not part of the code.

    Firstly, you need to figure out what the buttons are on your controller. I found this script for that:

    ****************
    ; July 6, 2005: Added auto-detection of joystick number.
    ; May 8, 2005 : Fixed: JoyAxes is no longer queried as a means of
    ; detecting whether the joystick is connected. Some joysticks are
    ; gamepads and don’t have even a single axis.

    ; If you want to unconditionally use a specific joystick number, change
    ; the following value from 0 to the number of the joystick (1-16).
    ; A value of 0 causes the joystick number to be auto-detected:
    JoystickNumber = 0

    ; END OF CONFIG SECTION. Do not make changes below this point unless
    ; you wish to alter the basic functionality of the script.

    ; Auto-detect the joystick number if called for:
    if JoystickNumber <= 0
    {
    Loop 16 ; 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
    }
    }

    #SingleInstance
    SetFormat, float, 03 ; Omit decimal point from axis position percentages.
    GetKeyState, joy_buttons, %JoystickNumber%JoyButtons
    GetKeyState, joy_name, %JoystickNumber%JoyName
    GetKeyState, joy_info, %JoystickNumber%JoyInfo
    Loop
    {
    buttons_down =
    Loop, %joy_buttons%
    {
    GetKeyState, joy%a_index%, %JoystickNumber%joy%a_index%
    if joy%a_index% = D
    buttons_down = %buttons_down%%a_space%%a_index%
    }
    GetKeyState, joyx, %JoystickNumber%JoyX
    axis_info = X%joyx%
    GetKeyState, joyy, %JoystickNumber%JoyY
    axis_info = %axis_info%%a_space%%a_space%Y%joyy%
    IfInString, joy_info, Z
    {
    GetKeyState, joyz, %JoystickNumber%JoyZ
    axis_info = %axis_info%%a_space%%a_space%Z%joyz%
    }
    IfInString, joy_info, R
    {
    GetKeyState, joyr, %JoystickNumber%JoyR
    axis_info = %axis_info%%a_space%%a_space%R%joyr%
    }
    IfInString, joy_info, U
    {
    GetKeyState, joyu, %JoystickNumber%JoyU
    axis_info = %axis_info%%a_space%%a_space%U%joyu%
    }
    IfInString, joy_info, V
    {
    GetKeyState, joyv, %JoystickNumber%JoyV
    axis_info = %axis_info%%a_space%%a_space%V%joyv%
    }
    IfInString, joy_info, P
    {
    GetKeyState, joyp, %JoystickNumber%JoyPOV
    axis_info = %axis_info%%a_space%%a_space%POV%joyp%
    }
    ToolTip, %joy_name% (#%JoystickNumber%):`n%axis_info%`nButtons Down: %buttons_down%`n`n(right-click the tray icon to exit)
    Sleep, 100
    }
    return

    *******************

    Secondly, you need to get some coordinates on your monitor. Specifically, you want the coordinates of the center (roughly) of each grid on your monitor. Also, if you wish to use some of the features like sit in, sit out, join waitlists, etc., you’ll need to get the coordinates for those locations. Below is code you can use to get the coordinates of where your mouse is.

    ********************

    CoordMode, Mouse, Relative
    MouseGetPos, xpos, ypos
    Msgbox, The cursor is at X%xpos% Y%ypos%.

    ***********************

    That above code is saved as a file. Then the code I would run is this:

    ************************

    CoordMode, Mouse, Relative
    c:: Run B:\Poker\WinningPokerJoyStick\MousePosition.ahk

    *************************

    When you run that second autohotkey file, you can put your mouse where a grid is, then press the letter c. The coordinates for your mouse location are displayed on your screen and you record it for use in the main script.

    Third is the main script that. Here goes:

    **************************

    #SingleInstance force ; closes prompt when reloading
    MyGlobal := n ; variable used for number entry mode for bet sizing
    SetKeyDelay, 0
    SetMouseDelay, 0

    #Persistent
    SetTimer, TimedOut, 250
    return

    TimedOut: ; cancel timed out and sure want to fold

    SetTitleMatchMode 3
    IfWinExist, AmericasCardroom
    {
    WinGet, TimeOuts, list, AmericasCardroom
    Loop %TimeOuts%
    {
    thisid := TimeOuts%A_Index%
    SetControlDelay -1
    ControlClick, OK, ahk_id %thisid%
    }
    }
    SetTitleMatchMode 3
    IfWinExist, StackAndTile.exe
    {
    WinGet, TimeOuts, list, StackAndTile.exe
    Loop %TimeOuts%
    {
    thisid := TimeOuts%A_Index%
    SetControlDelay -1
    ControlClick, OK, ahk_id %thisid%
    }
    }
    SetTitleMatchMode 2
    IfWinExist, Confirm
    {
    SetControlDelay -1
    ControlClick, No, Confirm
    }
    return

    ;TABLE POSITIONS

    Joy1:: ; table 3

    KeyWait, Joy1 ; wait until button is released
    GetKeyState, joypov, JoyPOV

    If joypov = 18000 ; sit out next hand all tables
    {
    ; activate screen under mouse
    MouseGetPos, , , id, control
    IfWinActive, ahk_id%id%
    {

    }
    else
    {
    WinActivate, ahk_id %id%
    }
    Click, 73, 403
    Click, 180, 361
    Send s
    }
    else if joypov = 0 ; sit out next hand all tables
    {
    ; activate screen under mouse
    MouseGetPos, , , id, control
    IfWinActive, ahk_id%id%
    {

    }
    else
    {
    WinActivate, ahk_id %id%
    }
    Click, 73, 403
    Click, 172, 384
    }
    else if MyGlobal = y ; when enter bet sizes
    {
    Send 2
    }
    else ; mouse over table 3
    {
    CoordMode, Mouse, Screen
    MouseMove, 896, 783
    }
    return

    Joy2:: ; table 4

    KeyWait, Joy2 ; wait until button is released

    GetKeyState, joypov, JoyPOV

    If joypov = 18000
    {
    ; activate screen under mouse
    MouseGetPos, , , id, control
    IfWinActive, ahk_id%id%
    {

    }
    else
    {
    WinActivate, ahk_id %id%
    }
    Click, 453, 461
    Send s
    }
    else if MyGlobal = y ; when enter bet sizes
    {
    Send 3
    }
    else ; mouse over table 4
    {
    CoordMode, Mouse, Screen
    MouseMove, 1587, 776
    }
    return

    Joy3:: ;table 1

    KeyWait, Joy3 ; wait until button is released
    GetKeyState, joypov, JoyPOV

    if joypov = 18000
    {
    Send z
    }
    else if MyGlobal = y ; when enter bet sizes
    {
    Send 1
    }
    else ; mouse over table 1
    {
    CoordMode, Mouse, Screen
    MouseMove, 912, 270
    }
    return

    Joy4:: ;table 2

    KeyWait, Joy4 ; wait until button is released
    GetKeyState, joypov, JoyPOV

    If joypov = 18000 ; sit out next hand all tables
    {
    ; activate screen under mouse
    MouseGetPos, , , id, control
    IfWinActive, ahk_id%id%
    {

    }
    else
    {
    WinActivate, ahk_id %id%
    }
    Click, 80, 413
    Click, 169, 366
    Send s
    }
    else if MyGlobal = y ; when enter bet sizes
    {
    Send 4
    }
    else ; mouse over table 2
    {
    CoordMode, Mouse, Screen
    MouseMove, 1592, 270
    }
    return

    ; FOLDING AND CHECK/CALL

    Joy5::

    ; activate screen under mouse
    MouseGetPos, , , id, control
    IfWinActive, ahk_id%id%
    {

    }
    else
    {
    WinActivate, ahk_id %id%
    }

    GetKeyState, joyy, JoyY
    GetKeyState, checkcall, Joy6

    If checkcall = D
    if joyy < 30 ; check/call no stack
    {
    Send c
    }
    else ; check/call
    {
    Send k
    }
    else if MyGlobal = y ; when enter bet sizes
    {
    Send 5
    }
    else if joyy < 30 ; fold no stacking
    {
    Send f
    }
    else ; fold with stacking
    {
    Send j
    }
    return

    ;BET

    Joy6::

    GetKeyState, joyz, JoyZ
    GetKeyState, joyy, JoyY
    GetKeyState, joypov, JoyPOV

    ; activate screen under mouse
    MouseGetPos, , , id, control
    IfWinActive, ahk_id%id%
    {

    }
    else
    {
    WinActivate, ahk_id %id%
    }

    If joyy > 70 ; execute typed in bet size
    {
    Send l
    MyGlobal = n
    }
    else if MyGlobal = y ; when enter bet sizes
    {
    Send 6
    }
    else if joypov = 18000 ; #3 choice
    {
    Send {Numpad3}
    Send l
    }
    else if joypov = 27000 ; #4 choice
    {
    Send {Numpad4}
    Send l
    }
    else if joypov = 0 ; #1 choice
    {
    Send {Numpad1}
    Send l
    }
    else if joypov = 9000 ; #2 choice
    {
    Send {Numpad2}
    Send l
    }
    else if joyz > 70 ; #5 choice
    {
    Send {Numpad5}
    Send l
    }
    return

    ; ENTER BET SIZING

    Joy7::

    ; activate screen under mouse
    MouseGetPos, , , id, control
    IfWinActive, ahk_id%id%
    {

    }
    else
    {
    WinActivate, ahk_id %id%
    }

    GetKeyState, joyz, JoyZ
    GetKeyState joyy, JoyY

    If MyGlobal = y
    If joyz < 30
    MyGlobal = n
    else
    {
    Send 7
    }
    else
    {
    Click, 644, 484
    MyGlobal = y
    }
    return

    ; GRIDHOLD

    Joy8::

    ; activate screen under mouse
    MouseGetPos, , , id, control
    IfWinActive, ahk_id%id%
    {

    }
    else
    {
    WinActivate, ahk_id %id%
    }

    GetKeyState, joyy, JoyY
    GetKeyState, joyz, JoyZ

    If MyGlobal = y
    {
    Send 8
    }

    else if joyy < 30 ; ungridhold and stack
    {
    Send q
    }
    else if joyz < 30 ; Keep all in grid
    {
    Send t
    }
    else if joyz > 70 ;
    {
    CoordMode, Mouse, Screen
    MouseMove, 2080, 145
    Send g
    }
    else ; gridhold table
    {
    Send q
    Send s
    }
    return

    Joy9:: ; open lobby

    GetKeyState, joyz, JoyZ

    If MyGlobal = y ; when enter bet sizes
    {
    Send 9
    }
    else if joyz < 30
    {
    Send x
    }
    else if joyz > 70
    {
    Send i
    }
    else ;
    {
    CoordMode, Mouse, Screen
    MouseMove, 2923, 677
    SetTitleMatchMode 1
    WinActivate, AmericasCardroom
    }
    return

    ; STACK OR JOIN TABLES; MISC

    Joy10::

    ; activate screen under mouse
    MouseGetPos, , , id, control
    IfWinActive, ahk_id%id%
    {

    }
    else
    {
    WinActivate, ahk_id %id%
    }

    GetKeyState, joyy, JoyY
    GetKeyState, joyz, JoyZ
    GetKeyState, joypov, JoyPOV

    if joyy < 30 ; stack all
    {
    Send a
    CoordMode, Mouse, Screen
    MouseMove, 912, 270
    }
    else if MyGlobal = y ; decimal
    if joyy > 70
    Send .
    else
    Send 0
    else if joypov = 0 ; autopost
    {
    Click 458, 459
    Click 261, 455
    }
    else if joypov = 18000 ; close table
    {
    CoordMode, Mouse, Relative
    Click 650, 12
    Sleep, 300
    SetTitleMatchMode 2
    IfWinExist, Leave ; leave table
    {
    SetControlDelay -1
    ControlClick,Yes, Leave
    }
    }
    else if joypov = 9000 ; exit script
    {
    exitapp
    }
    else if joyz > 70 ; join table
    {
    SetTitleMatchMode 2
    IfWinExist, Available ; join table
    {
    SetControlDelay -1
    ControlClick, OK, Available
    }
    }
    else if joyz < 30 ; cancel table
    {
    SetTitleMatchMode 2
    IfWinExist, Available ; cancel join
    {
    SetControlDelay -1
    ControlClick, Cancel, Available
    }
    }
    else ; stack single table
    {
    Send s
    }
    return

    ; JOIN WAITLISTS

    RButton:: ; join waitlist specific
    SetMouseDelay, 10

    CoordMode, Mouse, Screen
    Click 3349, 690
    Click 3155, 560
    SetMouseDelay, 0
    return

    MButton:: ; join waitlist any
    SetMouseDelay, 10

    CoordMode, Mouse, Screen
    Click 3449, 690
    Click 2839, 526
    Click 2912, 568
    Click 2895, 629
    Click 3155, 560
    SetMouseDelay, 0
    return

    ************************

    Much like the mouse code, the above isn’t what I run. I use this code to start and stop the above script.

    **************************

    Joy10::
    GetKeyState, joypov, JoyPOV
    If joypov = 27000
    {
    Run B:\Poker\WinningPokerJoyStick\AmericasCardroomAHK_Logitech.ahk
    return
    }
    else
    {
    }
    return

    ************************

    This way I can start and stop the script using my controller.

    Going through someone else’s code blows, so good luck. I didn’t do much documentation in the code itself, which just makes this process worse…

    6. Configuration / Manual: Designing what button configurations do what is a job. Over time, I made sure the most frequent operations were easy tasks for my fingers. Then, you want to create a manual and have it handy during play. It will take some practice to remember everything. However, over time, everything becomes second nature. Someone will talk about “folding” the laundry, and your left forefinger will involuntarily twitch ;) Here’s my manual:

    ControllerButtons

    Winning Poker AHK Manual

    Run Script – DPad Left + 10
    Close Script – DPad Right+ 10

    Stack & Tile
    Stop/Start SAT – Dpad Down + 3
    Disable HotKeys – R2 + 9
    Ignore Table – L2 + 9
    Stack – 10
    Stack All – LStick Up + 10
    Gridhold – 8
    Gridhold All – R2 + 8
    Grid Stacked Table – L2 + 8

    Betting

    Tables Locations: 1, 4, 2, 3
    Fold: 5 (no stack option: LStick Up + 5)
    Call/Check: 6 + 5 (no stack option: LStick Up)
    BetSize: First option then + 6
    · #1 – DPad Up
    · #2 – DPad Right
    · #3 – DPad Down
    · #4 – DPad Left
    · #5 – L2
    · Bet Box – 7
    o Automatic # mode to type bet (10 is 0 and LStick Down + 10 is period)
    o R2 + 7 to leave mode
    o LStick Down + 6 to execute bet
    o LStick Button to click if focus is stolen

    Lobby
    Activate Lobby – 9
    Join Waitlist Any – Mouse Middle Button
    Join Specific Waitlist -Mouse Right Button
    Accept Join – L2 + 10
    Cancel Join – R2 + 10

    Table
    AutoPost – DPad Up + 10
    Close Table – DPad Down + 10
    Deal In – DPad Down + 2
    Sit Out Next Hand All – DPad Down + 1
    Back All – DPad Up + 1
    Sit Out BB All – DPad Down + 4

    Table Positions
    Table 1 – 912 272
    Table 2 – 1592 270
    Table 3 – 896 783
    Table 4 – 1587 776
    Table 5 – 2269 265
    Table 6 -2269 788

    Specific Window Coordinates
    Bet Box – 644 484
    Sit Out Next Hand – 73, 403
    Sit Out BB – 80, 413
    sit out all tables – 180 361
    sit out bb all – 169 366
    back all tables – 172 384

    That’s that. Enjoy.

    Like this post? Receive free tips and articles from QTipPoker.

    facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

    Books by Owen Gaines Forums Multitabling on WPN (America’s Cardroom) with a Controller

    This topic contains 1 reply, has 2 voices, and was last updated by  idazujy 9 months ago.

    Viewing 2 posts - 1 through 2 (of 2 total)
    • Author
      Posts
    • #1185

      QTip
      Keymaster

      Here’s a demo of me using this setup while playing around 41 tables.

      People have emailed and PM’d me about getting this setup for a couple years now, wanting to pay me, etc. I’ve never done it. Now…here it is for everyone—free of charge. It will likely be a while before I masstable again. I don’t wish to sell this because I don’t want to support it. I’m sure the code could be more efficient, etc. Getting it to work on your setup will take some time and patience. I’m sure I have a couple weeks work in getting this setup just right.

      I doubt I’ll respond to inquiries; I’m sure you can get help in poker forums, etc. Anyway, this is the setup I use to play 45+ tables on Americas Cardroom.

    • Controller
    • Monitors
    • Furniture
    • Table Management
    • Script
    • Configuration / Manual
    • 1. Controller: You can use any controller that will connect to your PC. You want to make sure there are enough buttons. Otherwise, you may struggle to find sufficient combinations to do what you want. I use the Logitech Gamepad. I’ve used other controllers, but this one is my favorite, and it’s durable. If you can spare the extra cash, go for a wireless controller. When you get used to the setup, you can put in massive volume in a relaxed, laid back position. On the flip side, I also use to masstable while riding an exercise bike. A cord in the way is restrictive. This isn’t the time to pinch pennies. You’ll press these buttons hundreds of thousands of time; cheap controllers wear out quick and misclicks are a result. I also purchased an identical second controller to have on hand if the first ever broke. In a similar vein, I always had back-up batteries at my desk. When the controller isn’t responding well, that’s typically the problem.

      Once you get the controller cord plugged into your machine, you can go through the configuration setup on your computer.

      2. Monitors: I used two monitors. The first monitor is a 32” monitor. This is the minimum size I’d work with; would have liked a bigger one really. Why so big? This monitor is where you’ll play the tables. I use a HUD, so you don’t want minuscule numbers on the monitor wearing out your eyes. You’ll have four tables tiled on this monitor. The large size also allows you to get in a relaxed position without leaning forward to see the details. Actually, I used a 32” TV (like $250) for this one and saved a lot of cash over buying a 32” monitor (> $1k). It took some tweaking to get the text on the TV to look good, but it worked well.

      The second monitor I used a 17” monitor. Really, about any size would work. I used a 15” for a while before it died. This monitor is the location for Americas Cardroom lobby and a couple of workhorse grid slots for table management (more on this later).

      3. Furniture: If you’re looking to do some serious grinding, you must be comfortable. Sessions over 17 hours were routine for me. Spend the money to get a comfortable chair and a desk that puts your monitors at eye level. I also got a few special pillows for my neck. Not going to spend more time here. Get comfy.

      4. Table Management: I always wanted to take the time to write my own code for table management, but never found the time. I use StackAndTile (SaT). Unfortunately, it’s a monthly subscription (currently $18/month for the full version, and $9 a month for the small stakes version). SaT alone (w/o the rest of this setup) will likely help you impressively increase your volume. You’ll have to go through the instructions to learn how to use SaT on their website, but here are my settings.:

      Play Mode: Stack And Tile
      Move to Grid: When action required
      Total Grid Slots: 6
      Grid Visualization:

      GridLayout

      Hot Keys:

      HotKey1

      HotKey2

      5. Script: Here’s the tough part for those of us who aren’t programmers. The main purpose of the script is to facilitate the interaction between your controller and SaT. I also used the Script to close unwanted pops and get on waiting lists on Americas Cardroom client (using mouse buttons). I use Autohotkey. If you’ve never used autohokey, you’ll need to step through some tutorials and such; prepare to be tenacious… You’ll find much help in autohotkey forums and the help files online.

      There are a few pieces to using the script. When I paste code in this blog, I’ll surround the code in asterisks. The asterisks are not part of the code.

      Firstly, you need to figure out what the buttons are on your controller. I found this script for that:

      ****************
      ; July 6, 2005: Added auto-detection of joystick number.
      ; May 8, 2005 : Fixed: JoyAxes is no longer queried as a means of
      ; detecting whether the joystick is connected. Some joysticks are
      ; gamepads and don’t have even a single axis.

      ; If you want to unconditionally use a specific joystick number, change
      ; the following value from 0 to the number of the joystick (1-16).
      ; A value of 0 causes the joystick number to be auto-detected:
      JoystickNumber = 0

      ; END OF CONFIG SECTION. Do not make changes below this point unless
      ; you wish to alter the basic functionality of the script.

      ; Auto-detect the joystick number if called for:
      if JoystickNumber < = 0
      {
      Loop 16 ; 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
      }
      }

      #SingleInstance
      SetFormat, float, 03 ; Omit decimal point from axis position percentages.
      GetKeyState, joy_buttons, %JoystickNumber%JoyButtons
      GetKeyState, joy_name, %JoystickNumber%JoyName
      GetKeyState, joy_info, %JoystickNumber%JoyInfo
      Loop
      {
      buttons_down =
      Loop, %joy_buttons%
      {
      GetKeyState, joy%a_index%, %JoystickNumber%joy%a_index%
      if joy%a_index% = D
      buttons_down = %buttons_down%%a_space%%a_index%
      }
      GetKeyState, joyx, %JoystickNumber%JoyX
      axis_info = X%joyx%
      GetKeyState, joyy, %JoystickNumber%JoyY
      axis_info = %axis_info%%a_space%%a_space%Y%joyy%
      IfInString, joy_info, Z
      {
      GetKeyState, joyz, %JoystickNumber%JoyZ
      axis_info = %axis_info%%a_space%%a_space%Z%joyz%
      }
      IfInString, joy_info, R
      {
      GetKeyState, joyr, %JoystickNumber%JoyR
      axis_info = %axis_info%%a_space%%a_space%R%joyr%
      }
      IfInString, joy_info, U
      {
      GetKeyState, joyu, %JoystickNumber%JoyU
      axis_info = %axis_info%%a_space%%a_space%U%joyu%
      }
      IfInString, joy_info, V
      {
      GetKeyState, joyv, %JoystickNumber%JoyV
      axis_info = %axis_info%%a_space%%a_space%V%joyv%
      }
      IfInString, joy_info, P
      {
      GetKeyState, joyp, %JoystickNumber%JoyPOV
      axis_info = %axis_info%%a_space%%a_space%POV%joyp%
      }
      ToolTip, %joy_name% (#%JoystickNumber%):`n%axis_info%`nButtons Down: %buttons_down%`n`n(right-click the tray icon to exit)
      Sleep, 100
      }
      return

      *******************

      Secondly, you need to get some coordinates on your monitor. Specifically, you want the coordinates of the center (roughly) of each grid on your monitor. Also, if you wish to use some of the features like sit in, sit out, join waitlists, etc., you’ll need to get the coordinates for those locations. Below is code you can use to get the coordinates of where your mouse is.

      ********************

      CoordMode, Mouse, Relative
      MouseGetPos, xpos, ypos
      Msgbox, The cursor is at X%xpos% Y%ypos%.

      ***********************

      That above code is saved as a file. Then the code I would run is this:

      ************************

      CoordMode, Mouse, Relative
      c:: Run B:\Poker\WinningPokerJoyStick\MousePosition.ahk

      *************************

      When you run that second autohotkey file, you can put your mouse where a grid is, then press the letter c. The coordinates for your mouse location are displayed on your screen and you record it for use in the main script.

      Third is the main script that. Here goes:

      **************************

      #SingleInstance force ; closes prompt when reloading
      MyGlobal := n ; variable used for number entry mode for bet sizing
      SetKeyDelay, 0
      SetMouseDelay, 0

      #Persistent
      SetTimer, TimedOut, 250
      return

      TimedOut: ; cancel timed out and sure want to fold

      SetTitleMatchMode 3
      IfWinExist, AmericasCardroom
      {
      WinGet, TimeOuts, list, AmericasCardroom
      Loop %TimeOuts%
      {
      thisid := TimeOuts%A_Index%
      SetControlDelay -1
      ControlClick, OK, ahk_id %thisid%
      }
      }
      SetTitleMatchMode 3
      IfWinExist, StackAndTile.exe
      {
      WinGet, TimeOuts, list, StackAndTile.exe
      Loop %TimeOuts%
      {
      thisid := TimeOuts%A_Index%
      SetControlDelay -1
      ControlClick, OK, ahk_id %thisid%
      }
      }
      SetTitleMatchMode 2
      IfWinExist, Confirm
      {
      SetControlDelay -1
      ControlClick, No, Confirm
      }
      return

      ;TABLE POSITIONS

      Joy1:: ; table 3

      KeyWait, Joy1 ; wait until button is released
      GetKeyState, joypov, JoyPOV

      If joypov = 18000 ; sit out next hand all tables
      {
      ; activate screen under mouse
      MouseGetPos, , , id, control
      IfWinActive, ahk_id%id%
      {

      }
      else
      {
      WinActivate, ahk_id %id%
      }
      Click, 73, 403
      Click, 180, 361
      Send s
      }
      else if joypov = 0 ; sit out next hand all tables
      {
      ; activate screen under mouse
      MouseGetPos, , , id, control
      IfWinActive, ahk_id%id%
      {

      }
      else
      {
      WinActivate, ahk_id %id%
      }
      Click, 73, 403
      Click, 172, 384
      }
      else if MyGlobal = y ; when enter bet sizes
      {
      Send 2
      }
      else ; mouse over table 3
      {
      CoordMode, Mouse, Screen
      MouseMove, 896, 783
      }
      return

      Joy2:: ; table 4

      KeyWait, Joy2 ; wait until button is released

      GetKeyState, joypov, JoyPOV

      If joypov = 18000
      {
      ; activate screen under mouse
      MouseGetPos, , , id, control
      IfWinActive, ahk_id%id%
      {

      }
      else
      {
      WinActivate, ahk_id %id%
      }
      Click, 453, 461
      Send s
      }
      else if MyGlobal = y ; when enter bet sizes
      {
      Send 3
      }
      else ; mouse over table 4
      {
      CoordMode, Mouse, Screen
      MouseMove, 1587, 776
      }
      return

      Joy3:: ;table 1

      KeyWait, Joy3 ; wait until button is released
      GetKeyState, joypov, JoyPOV

      if joypov = 18000
      {
      Send z
      }
      else if MyGlobal = y ; when enter bet sizes
      {
      Send 1
      }
      else ; mouse over table 1
      {
      CoordMode, Mouse, Screen
      MouseMove, 912, 270
      }
      return

      Joy4:: ;table 2

      KeyWait, Joy4 ; wait until button is released
      GetKeyState, joypov, JoyPOV

      If joypov = 18000 ; sit out next hand all tables
      {
      ; activate screen under mouse
      MouseGetPos, , , id, control
      IfWinActive, ahk_id%id%
      {

      }
      else
      {
      WinActivate, ahk_id %id%
      }
      Click, 80, 413
      Click, 169, 366
      Send s
      }
      else if MyGlobal = y ; when enter bet sizes
      {
      Send 4
      }
      else ; mouse over table 2
      {
      CoordMode, Mouse, Screen
      MouseMove, 1592, 270
      }
      return

      ; FOLDING AND CHECK/CALL

      Joy5::

      ; activate screen under mouse
      MouseGetPos, , , id, control
      IfWinActive, ahk_id%id%
      {

      }
      else
      {
      WinActivate, ahk_id %id%
      }

      GetKeyState, joyy, JoyY
      GetKeyState, checkcall, Joy6

      If checkcall = D
      if joyy < 30 ; check/call no stack
      {
      Send c
      }
      else ; check/call
      {
      Send k
      }
      else if MyGlobal = y ; when enter bet sizes
      {
      Send 5
      }
      else if joyy < 30 ; fold no stacking
      {
      Send f
      }
      else ; fold with stacking
      {
      Send j
      }
      return

      ;BET

      Joy6::

      GetKeyState, joyz, JoyZ
      GetKeyState, joyy, JoyY
      GetKeyState, joypov, JoyPOV

      ; activate screen under mouse
      MouseGetPos, , , id, control
      IfWinActive, ahk_id%id%
      {

      }
      else
      {
      WinActivate, ahk_id %id%
      }

      If joyy > 70 ; execute typed in bet size
      {
      Send l
      MyGlobal = n
      }
      else if MyGlobal = y ; when enter bet sizes
      {
      Send 6
      }
      else if joypov = 18000 ; #3 choice
      {
      Send {Numpad3}
      Send l
      }
      else if joypov = 27000 ; #4 choice
      {
      Send {Numpad4}
      Send l
      }
      else if joypov = 0 ; #1 choice
      {
      Send {Numpad1}
      Send l
      }
      else if joypov = 9000 ; #2 choice
      {
      Send {Numpad2}
      Send l
      }
      else if joyz > 70 ; #5 choice
      {
      Send {Numpad5}
      Send l
      }
      return

      ; ENTER BET SIZING

      Joy7::

      ; activate screen under mouse
      MouseGetPos, , , id, control
      IfWinActive, ahk_id%id%
      {

      }
      else
      {
      WinActivate, ahk_id %id%
      }

      GetKeyState, joyz, JoyZ
      GetKeyState joyy, JoyY

      If MyGlobal = y
      If joyz < 30
      MyGlobal = n
      else
      {
      Send 7
      }
      else
      {
      Click, 644, 484
      MyGlobal = y
      }
      return

      ; GRIDHOLD

      Joy8::

      ; activate screen under mouse
      MouseGetPos, , , id, control
      IfWinActive, ahk_id%id%
      {

      }
      else
      {
      WinActivate, ahk_id %id%
      }

      GetKeyState, joyy, JoyY
      GetKeyState, joyz, JoyZ

      If MyGlobal = y
      {
      Send 8
      }

      else if joyy < 30 ; ungridhold and stack
      {
      Send q
      }
      else if joyz < 30 ; Keep all in grid
      {
      Send t
      }
      else if joyz > 70 ;
      {
      CoordMode, Mouse, Screen
      MouseMove, 2080, 145
      Send g
      }
      else ; gridhold table
      {
      Send q
      Send s
      }
      return

      Joy9:: ; open lobby

      GetKeyState, joyz, JoyZ

      If MyGlobal = y ; when enter bet sizes
      {
      Send 9
      }
      else if joyz < 30
      {
      Send x
      }
      else if joyz > 70
      {
      Send i
      }
      else ;
      {
      CoordMode, Mouse, Screen
      MouseMove, 2923, 677
      SetTitleMatchMode 1
      WinActivate, AmericasCardroom
      }
      return

      ; STACK OR JOIN TABLES; MISC

      Joy10::

      ; activate screen under mouse
      MouseGetPos, , , id, control
      IfWinActive, ahk_id%id%
      {

      }
      else
      {
      WinActivate, ahk_id %id%
      }

      GetKeyState, joyy, JoyY
      GetKeyState, joyz, JoyZ
      GetKeyState, joypov, JoyPOV

      if joyy < 30 ; stack all
      {
      Send a
      CoordMode, Mouse, Screen
      MouseMove, 912, 270
      }
      else if MyGlobal = y ; decimal
      if joyy > 70
      Send .
      else
      Send 0
      else if joypov = 0 ; autopost
      {
      Click 458, 459
      Click 261, 455
      }
      else if joypov = 18000 ; close table
      {
      CoordMode, Mouse, Relative
      Click 650, 12
      Sleep, 300
      SetTitleMatchMode 2
      IfWinExist, Leave ; leave table
      {
      SetControlDelay -1
      ControlClick,Yes, Leave
      }
      }
      else if joypov = 9000 ; exit script
      {
      exitapp
      }
      else if joyz > 70 ; join table
      {
      SetTitleMatchMode 2
      IfWinExist, Available ; join table
      {
      SetControlDelay -1
      ControlClick, OK, Available
      }
      }
      else if joyz < 30 ; cancel table
      {
      SetTitleMatchMode 2
      IfWinExist, Available ; cancel join
      {
      SetControlDelay -1
      ControlClick, Cancel, Available
      }
      }
      else ; stack single table
      {
      Send s
      }
      return

      ; JOIN WAITLISTS

      RButton:: ; join waitlist specific
      SetMouseDelay, 10

      CoordMode, Mouse, Screen
      Click 3349, 690
      Click 3155, 560
      SetMouseDelay, 0
      return

      MButton:: ; join waitlist any
      SetMouseDelay, 10

      CoordMode, Mouse, Screen
      Click 3449, 690
      Click 2839, 526
      Click 2912, 568
      Click 2895, 629
      Click 3155, 560
      SetMouseDelay, 0
      return

      ************************

      Much like the mouse code, the above isn’t what I run. I use this code to start and stop the above script.

      **************************

      Joy10::
      GetKeyState, joypov, JoyPOV
      If joypov = 27000
      {
      Run B:\Poker\WinningPokerJoyStick\AmericasCardroomAHK_Logitech.ahk
      return
      }
      else
      {
      }
      return

      ************************

      This way I can start and stop the script using my controller.

      Going through someone else’s code blows, so good luck. I didn’t do much documentation in the code itself, which just makes this process worse…

      6. Configuration / Manual: Designing what button configurations do what is a job. Over time, I made sure the most frequent operations were easy tasks for my fingers. Then, you want to create a manual and have it handy during play. It will take some practice to remember everything. However, over time, everything becomes second nature. Someone will talk about “folding” the laundry, and your left forefinger will involuntarily twitch ;) Here’s my manual:

      ControllerButtons

      Winning Poker AHK Manual

      Run Script – DPad Left + 10
      Close Script – DPad Right+ 10

      Stack & Tile
      Stop/Start SAT – Dpad Down + 3
      Disable HotKeys – R2 + 9
      Ignore Table – L2 + 9
      Stack – 10
      Stack All – LStick Up + 10
      Gridhold – 8
      Gridhold All – R2 + 8
      Grid Stacked Table – L2 + 8

      Betting

      Tables Locations: 1, 4, 2, 3
      Fold: 5 (no stack option: LStick Up + 5)
      Call/Check: 6 + 5 (no stack option: LStick Up)
      BetSize: First option then + 6
      · #1 – DPad Up
      · #2 – DPad Right
      · #3 – DPad Down
      · #4 – DPad Left
      · #5 – L2
      · Bet Box – 7
      o Automatic # mode to type bet (10 is 0 and LStick Down + 10 is period)
      o R2 + 7 to leave mode
      o LStick Down + 6 to execute bet
      o LStick Button to click if focus is stolen

      Lobby
      Activate Lobby – 9
      Join Waitlist Any – Mouse Middle Button
      Join Specific Waitlist -Mouse Right Button
      Accept Join – L2 + 10
      Cancel Join – R2 + 10

      Table
      AutoPost – DPad Up + 10
      Close Table – DPad Down + 10
      Deal In – DPad Down + 2
      Sit Out Next Hand All – DPad Down + 1
      Back All – DPad Up + 1
      Sit Out BB All – DPad Down + 4

      Table Positions
      Table 1 – 912 272
      Table 2 – 1592 270
      Table 3 – 896 783
      Table 4 – 1587 776
      Table 5 – 2269 265
      Table 6 -2269 788

      Specific Window Coordinates
      Bet Box – 644 484
      Sit Out Next Hand – 73, 403
      Sit Out BB – 80, 413
      sit out all tables – 180 361
      sit out bb all – 169 366
      back all tables – 172 384

      That’s that. Enjoy.

    #1196

    idazujy
    Participant

    26 yr old Electronic Gear Investments Worker Leo Mcqueeney from Brandon, has interests which include amateur astronomy, my little pony coloring pages to print and kayaking. that consisted of going to Historic Area of Willemstad. twilight coloring pages my little pony.

    Viewing 2 posts - 1 through 2 (of 2 total)

    You must be logged in to reply to this topic.