Thanks for testing that, Naka. Here is a slightly better version, as you only have to enter the co-ordinates once, at the top of the script.
Code:
X=368
Y=126
XButton2::
MouseGetPos,,,tableID
WinGetTitle, title, ahk_id %tableID%
IfNotInString, title, overlay
{
StringGetPos, move_pos, title, $
move_pos:=move_pos-3
StringLeft, title, title, %move_pos%
title=%title%overlay
ControlClick, x%X% y%Y%, %title%
} else
ControlClick, x%X% y%Y%, %title%
return