 LeftRight()
 {
     location := 0
-    ControlGetPos, x1, y1, , , %TCPanel1%, AHK_CLASS TTOTAL_CMD
+    ControlGetPos, x1, y1, , , %TCPanel1%, ahk_class TTOTAL_CMD
     if x1 > %y1%
         location += 2
     ControlGetFocus, TLB, ahk_class TTOTAL_CMD

TC_BeforeActionDo()
{
    Global TC_SendPos
    WinGet, MenuID, ID, AHK_CLASS #32768
    if MenuID And (TC_SendPos <> 572)
        return True
    ControlGetFocus, ctrl, AHK_CLASS TTOTAL_CMD
    Ifinstring, ctrl, %TCListBox%
        return False
    return True

                Break
            }
        }
        PostMessage, 0x19E, %Focus%, 1, %focus_control%, ahk_class TTOTAL_CMD
    }
}
<TC_AlwayOnTop>:
