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