@select window problem

May 30, 2008
235
2
Using TCMD 9.02.151.

I have defined the following function for starting a @select window maximized to the whole screen. I run it from TCMD.

ypos=%@FIELD[0,%@winpos[%_winfgwindow]]
xpos=%@FIELD[1,%@winpos[%_winfgwindow]]

: %1 = filename, %2 = window title
selectwinmax=%@select[%1, %@eval[0-%@ypos[]], %@eval[0-%@xpos[]], %@eval[%_ypixels-%@ypos[]], %@eval[%_xpixels-%@xpos[]], %2]

Ex: set entry="%@selectwinmax[c:\datalist.txt,Select entry]"

It works well when the filename parameter contains less lines than fits on the screen. Then the @select window is positioned so that the upper left corner is placed in the upper left corner of the screen and the bottom right corner is placed to the right of the screen.
The bottom of the window ends when the lines in the file ends.

When the file contains more lines than fits on the screen however, there are some problems. In that case it seems that the bottom of the @select window is placed at the top of the screen so that the whole window is invisible. If you move the window (Alt-Space to open menu and then select move) its size corresponds to the size of the screen.

This has worked well previously on older TCMD/TCC versions but not any longer. Has there been any change in the @select behavior or is there an error in my function definition?
 

rconn

Administrator
Staff member
May 14, 2008
12,316
148
nikbackm wrote:

> Using TCMD 9.02.151.
>
> When the file contains more lines than fits on the screen however, there
> are some problems. In that case it seems that the bottom of the @select
> window is placed at the top of the screen so that the whole window is
> invisible. If you move the window (Alt-Space to open menu and then
> select move) its size corresponds to the size of the screen.
>
> This has worked well previously on older TCMD/TCC versions but not any
> longer. Has there been any change in the @select behavior or is there an
> error in my function definition?

@SELECT was changed in v9 to *not* try to validate & correct your
incorrect parameters. (This was necessary in order to support multiple
monitors & off-window positioning.)

Rex Conn
JP Software
 
May 30, 2008
235
2
nikbackm wrote:

@SELECT was changed in v9 to *not* try to validate & correct your
incorrect parameters. (This was necessary in order to support multiple
monitors & off-window positioning.)

Well, I first created this function with v9 so the change was then made in later v9 builds maybe?

If the parameters are incorrect, how come the window size and position varies with the number of lines in the file? Obviously the top,bottom,left,right parameters are the same with each use (unless the TCMD window is moved).
 

rconn

Administrator
Staff member
May 14, 2008
12,316
148
nikbackm wrote:

>
> Quote:
> If the parameters are incorrect, how come the window size and position
> varies with the number of lines in the file? Obviously the
> top,bottom,left,right parameters are the same with each use (unless the
> TCMD window is moved).

The height is reduced if the file doesn't have enough lines to fill the
specified window. If the file has more lines @SELECT will use the
specified size and add a scrollbar.

Rex Conn
JP Software
 
May 30, 2008
235
2
nikbackm wrote:



The height is reduced if the file doesn't have enough lines to fill the
specified window. If the file has more lines @SELECT will use the
specified size and add a scrollbar.

Ok, that makes sense.

How does @select interpret "top,left,bottom,right"? It seems a bit inconsistent. It's not documented in the help file either.

This

%@select[power.txt,0,0,120,100,test]

Opens a window starting from the top left of the TCC tab window in TCMD that is almost as wide as the tab window as well.

But this (Increased "right" from 100 to 200)

%@select[power.txt,0,0,120,200,test]

Opens a window starting from the top left of the TCMD main window. This window is also much smaller, both height and width.

I guess the second example uses pixels to size the window while the first uses characters. But why does the first use the TCC tab window as origo while the latter uses the TCMD main window?
 
May 30, 2008
235
2
I got it to work by changing the function like this:

ypos=%@FIELD[0,%@winpos[%_winfgwindow]]
xpos=%@FIELD[1,%@winpos[%_winfgwindow]]
: %1 = file, %2 = title

selectwinmax=%@select[%1, %@eval[0-%@ypos[]], %@eval[0-%@xpos[]], %@eval[%_ypixels-%@ypos[]-30], %@eval[%_xpixels-%@xpos[]], %2]

That is, I subtract 30 from the calculated bottom value.
Anything less => select window is displayed above the visible area of the screen.

The @select window does not use all the screen this way however. There are some 20-30 pixels at the bottom of the screen it does not use.

My Windows task bar is set to auto-hide so it's most often not visible. Perhaps the @select window placement does not take this into account and always assumes the task bar is visible?
 
May 30, 2008
235
2
I should perhaps also point out a positive thing with the new @select implementation to offset the complaints. :)

The old @select only worked with files containing ~2300 lines or less. The new one seems to have no upper limit.

Good for my search aliases/batchfiles which uses @select to displayed found results.
 

rconn

Administrator
Staff member
May 14, 2008
12,316
148
nikbackm wrote:

>
> Quote:
> How does @select interpret "top,left,bottom,right"? It seems a bit
> inconsistent. It's not documented in the help file either.
>
> This
>
> %@select[power.txt,0,0,120,100,test]
>
> Opens a window starting from the top left of the TCC tab window in TCMD
> that is almost as wide as the tab window as well.
>
> But this (Increased "right" from 100 to 200)
>
> %@select[power.txt,0,0,120,200,test]
>
> Opens a window starting from the top left of the TCMD main window. This
> window is also much smaller, both height and width.
>
> I guess the second example uses pixels to size the window while the
> first uses characters. But why does the first use the TCC tab window as
> origo while the latter uses the TCMD main window?

V9 added a screen coordinate positioning option for all popup windows
(v8 and earlier only allowed row/column positioning, and only within the
4NT window). If the width is > 150, it is assumed to be a screen
coordinate. (It has been discussed several times here, and is in the
help file in the configuration dialog section.)

In v10 and beyond, the row/column positioning will be removed and
everything will be in screen coordinates.

Rex Conn
JP Software
 
May 20, 2008
3,515
4
Elkridge, MD, USA
rconn wrote:
| In v10 and beyond, the row/column positioning will be removed and
| everything will be in screen coordinates.

... thus breaking old batch files.

I'd like the option of "window coordinates", i.e., positioning the pop-up
relative to the TCC window, or in a TCMD tab, relative to the TCC tab
display (I am allowing for the vertical/horizontal splits available in
TCMD), i.e., I should be able to fix the locations of the pop-ups for
multiple TCC instances relative to the display locaiton of the underlying
TCC instances.
--
Steve
 
----- Original Message ----- Subject: RE: [Support-t-380] Re: @select window
problem

: V9 added a screen coordinate positioning option for all popup windows
: (v8 and earlier only allowed row/column positioning, and only within the
: 4NT window). If the width is > 150, it is assumed to be a screen
: coordinate. (It has been discussed several times here, and is in the
: help file in the configuration dialog section.)
:
: In v10 and beyond, the row/column positioning will be removed and
: everything will be in screen coordinates.
:
: Rex Conn
: JP Software

V10 sounds very cool. So this will apply to QUERYBOX/MSBGOX/@SELECT and any
other tool that requires coordinates. ?
Will drawbox/hline/vline be removed or updated to follow the above syntax.
If "drawbox/ h-v line" updated could they be updated to include true
windowie styled qui boxes in a simpler manner drawbox /pos=130,250 n
n being the type of gui box [1 2 3 4]
 

rconn

Administrator
Staff member
May 14, 2008
12,316
148
Steve Fábián wrote:

> rconn wrote:
> | In v10 and beyond, the row/column positioning will be removed and
> | everything will be in screen coordinates.
>
> ... thus breaking old batch files.

But it hasn't seemed to affect you with the v10 beta till now?


> I'd like the option of "window coordinates", i.e., positioning the pop-up
> relative to the TCC window, or in a TCMD tab, relative to the TCC tab
> display (I am allowing for the vertical/horizontal splits available in
> TCMD), i.e., I should be able to fix the locations of the pop-ups for
> multiple TCC instances relative to the display locaiton of the underlying
> TCC instances.

There is no "underlying" position of the TCC windows (they're hidden &
off-screen).

Rex Conn
JP Software
 
May 20, 2008
3,515
4
Elkridge, MD, USA
rconn wrote:
| Steve Fábián wrote:
|
|
| ---Quote---
|| rconn wrote:
||| In v10 and beyond, the row/column positioning will be removed and
||| everything will be in screen coordinates.
||
|| ... thus breaking old batch files.
| ---End Quote---
| But it hasn't seemed to affect you with the v10 beta till now?

No - I don't normally use @select.
|
|
|
| ---Quote---
|| I'd like the option of "window coordinates", i.e., positioning the
|| pop-up relative to the TCC window, or in a TCMD tab, relative to the
|| TCC tab display (I am allowing for the vertical/horizontal splits
|| available in TCMD), i.e., I should be able to fix the locations of
|| the pop-ups for multiple TCC instances relative to the display
|| locaiton of the underlying TCC instances.
| ---End Quote---
| There is no "underlying" position of the TCC windows (they're hidden &
| off-screen).

Not even for stand-alone TCC? Notice that for TCC running in TCMD tab I
explicitly stated "relative to the TCC tab display" - in other words,
wherever the originating TCC instance is displayed. If stand-alone TCC is
also running in a "fake" display, my suggestion for all cases is the same:
allow the specification to be relative to whereever TCC commands and
responses are displayed.

Hope this eliminates and ambiguity.
--
Steve
 
May 30, 2008
235
2
nikbackm wrote:



V9 added a screen coordinate positioning option for all popup windows
(v8 and earlier only allowed row/column positioning, and only within the
4NT window). If the width is > 150, it is assumed to be a screen
coordinate. (It has been discussed several times here, and is in the
help file in the configuration dialog section.)

In v10 and beyond, the row/column positioning will be removed and
everything will be in screen coordinates.

Thanks.

I had some vague memory of this and managed to find the TCC Configuration Dialog - Windows help item where it was documented. It would perhaps be a good idea to have a link in the @select help item to this one. Or just repeat it.

But perhaps no need if the row/column positioning will be removed in v10.
 
Similar threads
Thread starter Title Forum Replies Date
R @select inside alias gives different (insanely small) window Support 7
mikea How to? @select[] window size, redux. Support 3
Joe Caverly Windows Terminal and @SELECT Support 13
WinLanEm @SELECT problem Support 6
T @select and @selectarray issues Support 2
C How to? Select 100 random pictures from 30,000 Support 8
MikeBaas How to? SELECT: exclude files / display prompt Support 2
rps Documentation "Select" command switch order incorrect Support 4
vefatica IDE double-click select? Support 29
gschizas How to? How can I use select with a folder that already contains parentheses? Support 7
T How to? Select and Delete text Support 6
mikea How to? Understanding @select[] Support 2
vhodro How to? Select text Support 10
WavSlave Fixed Escaping out of SELECT sometimes still executes the command Support 2
B Select and run lines from Command Input panel? Support 1
nikbackm Fixed v15: Issue with @select Support 3
G Fixed v15.00.27: @SELECT Support 10
D ini directives and @select example in Help Support 0
ehab aboudaya How to? Copy to clipboard on select Support 5
Phileosophos SELECT command opens additional tab Support 9
S SELECT DEL (*D.DLL) - output curious Support 8
vefatica Positioning @SELECT[] popup? Support 3
WadeHatler Any way to restore the Text Based "Select File" Windows in TCC Support 2
Stefano Piccardi how to @SELECT redirected input? Support 4
Joe Caverly Error when sorting list alphabetically for @select Support 2
S SELECT - does it support ranges? Support 2
nikbackm @select function and TAB characters Support 1
Joe Caverly @select like 4DOS Support 1
D Can you feed a file list to SELECT? Support 1
A @select versio 10.31 Support 1
R History window wrong size, can't remember size change Support 12
K_Meinhard How to? Help window position Support 7
D Directory History Window with wildcard search Support 3
Dmitry L. Kobyakov Documentation Error in the Help: the WINDOW command Support 0
L LIST's pop-up search loses focus in a Windows Terminal window Support 15
ntak About window size notification Support 6
R Batch Debugger Command Expansion Window Support 3
R How do I get a Git Bash shell to appear in TCC window? Support 7
G Press on another Window Support 24
Peter Murschall IDE: After undocking the command expansion Window is offended Support 2
T TCC Window Background Color Anomaly Support 9
A v25 BC break in WINDOW and ACTIVATE Support 12
vefatica BTM, elevated, console window caption? Support 4
W Hide window Support 7
R How to? START program as top window? Support 2
P No linefeed on last line of console window Support 2
scottb How to? ipconfig output in current window Support 4
R How to? Change TCMD tab font size in window menu Support 3
T Fixed IDE locks up if edit window for running batch is closed Support 6
E How to change window title tcmd window - not tcc window Support 1

Similar threads