mIRC Home    About    Download    Register    News    Help

Print Thread
#27151 30/05/03 11:52 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
can any1 can give me a better explanation for the -t switch in /window that set the tab positions? i just can't understand how it works and what if i specify only two positions and i add to the window more then two tabs?

#27152 31/05/03 01:57 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Try this command:
Code:
//window -l -t[color:red]30[/color],[color:green]60[/color] @@ | var %i = 1 | while %i < 10 { aline @@ $replace(Line %i - Column 1@[color:red]Line %i - Column 2[/color]@[color:green]Line %i - Column 3[/color],@,$chr(9)) | inc %i }
The -tN1,N2,N3,N4,....Ni says that if tab-delimited text will be spaced in columns according to this: the distance between the 2nd column and the left window border will be N1 characters; the distance between the 3rd column and the left border will be N2 etc. As you can see from the colours of the example above, The Line %i Column 2 column starts at 30 characters to the right.

I don't know what happens if you add more columns than the number of N's specified in -t but why don't you try it? In case you're wondering though, you cannot change the N values (used in -t) AFTER you have opened the window by calling /window again.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#27153 31/05/03 10:43 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
//window -l -t1,1 @a
and then
//aline @a a $+ $chr(9) $+ b $+ $chr(9) $+ c
it doesn't add 1 space it make it without spaces
??

#27154 31/05/03 12:36 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Because, as I said, every number in -t specifies the distance (in characters) from the beginning of the line, not the distance between the columns themselves. So, with -t1,1 you're telling mirc to put "b" and "c" 1 char to the right. mirc puts "b" right after "a", but instead of overwriting "b" with "c" (since this was given a distance of 1 too) it puts it one char to the right. Obviously the shortest distance between two columns is 1.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#27155 31/05/03 12:43 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
uhhh i understand
thanks

#27156 01/06/03 03:14 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
does the -t switch works for the window too? or just listbox ?

#27157 01/06/03 03:17 AM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
yes, -t works in plain text @windows, as well as list @windows and side listboxes.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#27158 01/06/03 03:25 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
uh k

#27159 01/06/03 03:29 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
well, it's not working:
/window -t2 @c
and then
//echo @c abc $+ $chr(9) $+ cde
it's not worked like i wanted
it should be abc cde
and it does abc [many spaces] cde



#27160 01/06/03 04:30 AM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
in addition to the tabstops that you specify, mIRC continues to assume additional tabulated columns be 5 spaces apart, past the last tabstop you specify.

Since you specified a tabstop of 2, and 'abc' is 3 characters, you already exceeded your first (and only) specified tabstop. The next tabstop lands on 7 (2 + 5), and the next wil be 13.
Code:
-V----v----v----v
abc   cde


Try specifing tabstops further apart, or data that actually fits in the column widths you specified.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#27161 01/06/03 12:08 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
huh?
i don't understand nothing


Link Copied to Clipboard