mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
This does not create @test, nor does it generate an error for invalid parameters.

Code:
//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.

Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
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).

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
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.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Jan 2004
Posts: 2,127
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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:

https://forums.mirc.com/ubbthreads.php/topics/261953/Custom_Windows_with_Elastic_&a#Post261953

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.


Link Copied to Clipboard