Open Side Menu Go to the Top
Register
autorail ahk script autorail ahk script

04-14-2012 , 12:18 PM
Here is a simple ahk script to auto close the tournament lobby window when railing games. Just select a game you want to rail and press the Alt+r key combination and it will simply open the tournament table and close the tournament lobby. Useful when you want to rail multiple tables without having to close the annoying lobbies that popup.

This is my first attempt ever at writing an ahk script so it is quite donkeyish but seems to work. If anyone knowledgeable about ahk wants to improve it, please go ahead.

Copy the code below to a file autorail.ahk and place it somewhere on your computer.

Code:
;auto close the annoying tournament lobby window when railing games
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
#Persistent
#SingleInstance, Force
SetTitleMatchMode, RegEx

rail_Hotkey = !r
Hotkey, %rail_Hotkey%, autorail
return

autorail:

Winget, ps_pid, pid, PokerStars Lobby
WinGet, clist, ControlList, ahk_class #32770 ahk_pid%ps_pid%
ControlClick, PokerStarsButtonClass29, ahk_class #32770 ahk_pid%ps_pid%
Sleep, 500
IfWinExist, Tournament.*Lobby ahk_class #32770 ahk_pid%ps_pid%
{
  ControlClick, PokerStarsButtonClass11, Tournament.*Lobby ahk_class #32770 ahk_pid%ps_pid%
  WinClose, Tournament.*Lobby ahk_class #32770 ahk_pid%ps_pid%
}
return
autorail ahk script Quote
04-14-2012 , 08:58 PM
thanks
autorail ahk script Quote
04-16-2012 , 06:02 PM
Script now also works in the 'Find a Player' window. Pressing Alt+r in this window will hit refresh and open the selected player table. You may have to hit Alt+r twice in a row sometimes for some unknown reason...

Code:
;auto close the annoying tournament lobby window when railing games
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
#Persistent
#SingleInstance, Force
SetTitleMatchMode, RegEx

rail_Hotkey = !r
Hotkey, %rail_Hotkey%, autorail
return

autorail:

Winget, ps_pid, pid, PokerStars Lobby
IfWinActive, ahk_class #32770 ahk_pid%ps_pid%
{
  ControlClick, PokerStarsButtonClass29, ahk_class #32770 ahk_pid%ps_pid%
  Sleep, 500
  IfWinExist, Tournament.*Lobby ahk_class #32770 ahk_pid%ps_pid%
  {
    ControlClick, PokerStarsButtonClass11, Tournament.*Lobby ahk_class #32770 ahk_pid%ps_pid%
    WinClose, Tournament.*Lobby ahk_class #32770 ahk_pid%ps_pid%
  }
} 

IfWinActive, Find a Player
{
  ControlClick, Button2, Find a Player
  Sleep, 1000
  ControlClick, Button4, Find a Player
  Sleep, 1000
  IfWinExist, Tournament.*Lobby ahk_class #32770 ahk_pid%ps_pid%
  {
    ControlClick, PokerStarsButtonClass11, Tournament.*Lobby ahk_class #32770 ahk_pid%ps_pid%
    WinClose, Tournament.*Lobby ahk_class #32770 ahk_pid%ps_pid%
  }
}
 
return
autorail ahk script Quote

      
m