mIRC Home    About    Download    Register    News    Help

Topic Options
#262237 - 11/01/18 05:25 PM window -t @test does nothing
maroon Offline
Fjord artisan

Registered: 12/01/04
Posts: 642
This does not create @test, nor does it generate an error for invalid parameters.

//window -c @test | window -t @test | echo -a test

/help /window shows syntax "t[N,...,N]" implying that the numbers are optional, allowing -t $+ %null to be used with default positions.

#262238 - 11/01/18 07:44 PM Re: window -t @test does nothing [Re: maroon]
Khaled Offline

Planetary brain

Registered: 04/12/02
Posts: 4035
Loc: London, UK
Thanks for your bug report.

The /window code actually checks for an empty -t and redirects the call so that it does not create a window. I can't say why, as it was added so long ago, but it looks like it was intentional. It would be easy to fix but considering it has worked this way ever since it was created, I am not too keen on changing it.

In versions.txt, it is listed as [-tN,..,N], so there is a discrepancy there from the help file.

It also looks like you can update the tabs of an existing @window by using /window -t N N N ... although this is not documented in the help file but is mentioned in versions.txt (v5.61, item 55).

#262240 - 12/01/18 12:43 AM Re: window -t @test does nothing [Re: Khaled]
Raccoon Offline
Hoopy frood

Registered: 18/02/03
Posts: 2243
Loc: New Mexico Tech
Originally Posted By: Khaled
It also looks like you can update the tabs of an existing @window by using /window -t N N N ... although this is not documented in the help file but is mentioned in versions.txt (v5.61, item 55).

Oh, neat! This makes me giddy! Thanks maroon 'n Khaled.
doiní things a particle can

#262241 - 12/01/18 06:43 AM Re: window -t @test does nothing [Re: Khaled]
maroon Offline
Fjord artisan

Registered: 12/01/04
Posts: 642
Thanks. it looks like this is similar to requests for dynamic tabs that I've seen over the years, but didn't realize it was hidden in versions.txt. The most recent feature request being here:


It was asking for elastic tabs that auto-adjust based on the fattest row in that columns, and also being able to sort by contents of a tab-delimited columns.

* *

I'm still finding bugged behavior for this feature, unless there are other undocumented things which means I'm doing things wrong.

It looks like the optional [N's] in /help comes from being able to use no numbers to reset tabs to default.

i.e. reset tabstops to default as if -t never used with:

/window -t @test

instead of changing tabstops like: /window -t @test 11 22 33 44

The alternate syntax for resetting tabstops seems like it should be valid only if the target @win is already open. If creating a window using -t $+ null, it should either generate an error or behave as if the -t switch were not used and not expect any numbers following @win to be creating new tabstops. Otherwise it would be ambiguous whether this is trying to create @win while setting tabstops or whether some/all of the tabstops are defining the X Y W H values.

* *

I'm having difficulty getting this tabstop change to behave consistently unless it's a -l listbox window.

If it's a -l listbox window, I've had 100% success using "/window -t @test [ N [ N ] ]" to change the location of tabstops or reset tabstops to defaults. And making these changes in a -l listbox never needs adding a line to the @win to see the changes take effect.

But when @win is not created using the -l switch, it's unpredictably inconsistent whether it lets me change the tabstops or not. And the intermittent successes always require adding a line to get the display to show the new tabstops.

I created @test using -t11,22,33 and tried to change the tabstops, and the change isn't visible until adding a line to the window, which could be a problem if the window uses -s sort or it would violate the -j limit. Sometimes I could try to reset tabstops to 22 44 66 and have nothing happen after adding a line then deleting it. I then repeat the 3 reset/add/delete commands and they might work that time. I can't create a non-listbox alias which is guaranteed to have some commands succeed or others fail. I cannot detect a pattern in why something works or doesn't. Sometimes I can even repeat the add/delete commands after they fail and they will work the next time. The best I can tell is that they seem more likely to work when there's been a delay of several seconds before trying again.