# Get tab position and size

#### David Marcus

I can get the position and size of a TCC window via %@winpos[=%_pid] and %@winsize[=%_pid]. Is there a way to get the position and size of a tab in Take Command?

TCC 21.00.39 x64 Windows 10 [Version 10.0.15063]

#### rconn

Are you talking about the tab itself, or the window below the tab?

Why do you need that? I would be reluctant to make that info available in TCC, since nobody but TCMD should ever be writing to a tab window.

#### David Marcus

I meant the window below the tab. I don't want to write to the window. I want to pop up my editor over the window. That's the main feature of LIST that I use: it runs in the existing window rather than opening in a random location. The following btm file works reasonably well for a TCC console window, but not when run in a tab.

Code:
*on errormsg cancel
*setlocal
*unalias *
set pos=%@winpos[=%_pid]
set size=%@winsize[=%_pid]
set cols=%@max[10,%@eval[(%@word[1,%size] \ 7) - 6]]
set lines=%@max[10,%@eval[(%@word[0,%size] \ 11) - 6]]
"%@shfolder[42]\Eps13\bin\epsilon.exe" -p0 -ka73 -vx%@word[1,%pos] -vy%@word[0,%pos] -vc%cols -vl%lines %\$

#### vefatica

That doesn't work for a stand-alone console window.

#### rconn

That doesn't work for a stand-alone console window.

Replies
2
Views
210
Replies
3
Views
506
Replies
10
Views
1K
Replies
0
Views
482
Replies
2
Views
1K
Replies
4
Views
686
Replies
11
Views
1K
Replies
6
Views
756
Replies
9
Views
1K
Replies
0
Views
579
Replies
2
Views
673
Replies
14
Views
2K
Replies
6
Views
1K
Replies
3
Views
1K
Replies
6
Views
1K
Replies
4
Views
1K
Replies
16
Views
3K
Replies
2
Views
865
Replies
9
Views
2K
Replies
2
Views
1K
Replies
2
Views
1K
Replies
2
Views
1K
Replies
3
Views
2K
Replies
7
Views
2K
Replies
5
Views
1K
Replies
9
Views
2K
Replies
1
Views
1K
Replies
2
Views
949
Replies
0
Views
929
Replies
3
Views
2K
Replies
5
Views
2K
Replies
4
Views
984
Replies
3
Views
1K
Replies
7
Views
1K
Replies
2
Views
1K
Replies
1
Views
991
Replies
3
Views
1K
Replies
12
Views
2K
Replies
2
Views
1K
Replies
7
Views
2K
Replies
4
Views
1K
Replies
18
Views
2K
Replies
19
Views
3K
Replies
5
Views
1K
Replies
5
Views
1K
Replies
3
Views
2K
Replies
4
Views
2K
Replies
1
Views
931
Replies
5
Views
1K
Replies
6
Views
2K