CurTab
CurTab(<window number>)
The CurTab internal function (introduced in BR! 4.16) can be used to return the active tabbed window number.
The required parameter needs to be any open window within the tabbed group.
CurTab will return the clicked window number within the Tabbed group of windows.