Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 10th, 2012  |  syntax: None  |  size: 3.22 KB  |  hits: 27  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. convert code to python
  2. ; Thois TableOpener for PokerStars v1.05
  3. ; Opens new cash game tables from the lobby every x seconds (if there are  less tables opened than your predefined settings). A great tool for multi-tablers.
  4. ; Customize the variables below (between the lines)
  5. ; 'Thois' on PS for donations
  6.  
  7. ; Customizable variables (between the lines)
  8. ;------------------------------------------
  9. rowheight := 13 ;In the PokerStars lobby go to View > Text Size: For Medium & smaller:13, For smallest:12, For Larger:15, For Largest:17
  10. recheck := 50 ;How often the script should open up new tables (if needed),     50=10seconds, 25=5seconds etc... Try not to set this too low for CPU performance issues
  11. ;------------------------------------------
  12.  
  13. Gui, Font, s8, Arial
  14. Gui, Add, Text,, Number Of Tables:
  15. Gui, Add, Edit
  16. Gui, Add, UpDown, vnumberoftablestokeepopen Range1-24, 12
  17. Gui, Add, Checkbox, venabledisable, Run!
  18. Gui, Show,, Thois TableOpener for PokerStars v1.00
  19. Gui, Submit, NoHide
  20.  
  21. numberofloopinstances := recheck - 1
  22.  
  23. Loop
  24. {
  25. Gui, Submit, NoHide
  26. SendMessage, 0x115, 0, 0, PokerStarsListClass1, PokerStars Lobby
  27. numberofloopinstances := numberofloopinstances + 1
  28. if (numberofloopinstances = recheck)
  29.     {
  30.     numberofloopinstances := 0
  31.     WinGet, numberofwindows, Count, ahk_class PokerStarsTableFrameClass,,Lobby
  32.     beffen := numberoftablestokeepopen - numberofwindows
  33.     if (beffen > 0 AND enabledisable = 1)
  34.         {
  35.         Loop
  36.             {
  37.             ControlGet, tablesinthelobby, Hwnd, , PokerStarsListClass1, PokerStars Lobby
  38.             yclick := 1 + (rowheight * A_Index) - rowheight
  39.             PostLeftClick(1, yclick, tablesinthelobby)
  40.             ControlClick, PokerStarsButtonClass10, PokerStars Lobby
  41.             Sleep, 500
  42.             WinGet, numberofwindows, Count, ahk_class PokerStarsTableFrameClass,,Lobby
  43.             beffen := numberoftablestokeepopen - numberofwindows
  44.             if (beffen = 0)
  45.                 {
  46.                 break
  47.                 }
  48.             }
  49.         }
  50.     }
  51. Sleep, 200
  52. }
  53.  
  54. ; Hotkeys (disabled)
  55.  
  56. ;~Xbutton1:: ;Endlessly cycles between all tables in the stack the cursor is pointing at (brings the front table to the back), disabled (remove ; marks to enable)
  57. ;MouseGetPos,,,tableID
  58. ;WinGetClass, classoftableid, ahk_id %tableID%
  59. ;if (classoftableid = "PokerStarsTableFrameClass")
  60. ;   {
  61. ;   WinSet, Bottom,, ahk_id %tableID%
  62. ;   }
  63. ;return
  64.  
  65. ;~Xbutton2:: ;Closes the table the mouse is pointing at (also clicks the OK warning button), disabled (remove ; marks to enable)
  66. ;MouseGetPos,,,tableID
  67. ;WinGetClass, classoftableid, ahk_id %tableID%
  68. ;if (classoftableid = "PokerStarsTableFrameClass");
  69. ;   {
  70. ;   WinClose, ahk_id %tableID%
  71. ;   Sleep,20
  72. ;   ControlClick, Button1, Table, OK
  73. ;   }
  74. ;return
  75.  
  76. ;Juks rocks - I deactivated WinActivate so that the Lobby doesnt steal focus
  77. PostLeftClick(x, y, table_id, activate=1) {
  78. ; ### JUK: Send the down left click, then the mouse-up messages.
  79. ; NOTE: This is relative to the top left of the client area and NOT the top left of the
  80. ;       window (ie: It *doesn't* include the title-bar like AHK's MouseClick does!!!).
  81. If activate
  82. ; WinActivate, ahk_id%table_id%
  83. PostMessage, 0x201, 0x0001, ((y<<16)^x), , ahk_id%table_id%
  84. PostMessage, 0x202 , 0, ((y<<16)^x), , ahk_id%table_id%
  85. }
  86.  
  87. GuiClose:
  88. ExitApp