mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2004
Posts: 2,081
M
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
M
Joined: Jan 2004
Posts: 2,081
Is it possible to remove a few lines from the top of a normal #channel window?

"/dline #test 1-10" doesn't work.

I suppose it's possible to use savebuf to hold the #channel contents and then /clear #channel and use loadbuf to put back the fewer lines, but that would be irritating to the user.

thanks

Joined: Jul 2007
Posts: 1,124
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
I believe you have the /loadbuf and /dline command confused. They're used when you try to load data from a file into a custom window and delete particular lines at that point. You can't use them in conjunction with the actual channel message lines. You may need to use a custom event with the ^ prefix to halt the default message output and then manipulate it into a desired output you're after via the echo command and its appropriate switches.

Last edited by Tomao; 15/10/11 07:38 PM.
Joined: Jan 2004
Posts: 2,081
M
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
M
Joined: Jan 2004
Posts: 2,081
I wasn't confusing them, i was saying why loadbuf/savebuf weren't good substitutes. And you can use them with channel messages, except they treat a wrapped line as several different lines:

/savebuf 12-999999 #help temp.txt
/loadbuf -r #help temp.txt

but this isn't transparent to a user that is scrolled partway up a window, etc. $line(#help,number) returns the entire line that's wrapped, but savebuf/loadbuf treat each portion of the wrapped text as a separate line.

and i'm not wanting to create a custom window to simulate a channel, i'm wanting to be able to do in a #channel the same thing i can do in a @window, deleting a few lines at the top of a #channel, which /dline doesn't seem to allow.

Joined: Feb 2006
Posts: 523
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 523
yea, it's a very unfortunate limitation that the scripter has such little control over the contents of non-custom windows. you have pretty much all the feasible alternative ideas, only thing i would add is use /loadbuf's -r switch rather than an explicit /clear, and if you have logging enabled you could take advantage of the fact that the log file is already saved to disk (but then of course you lose lines that were added using /echo -g).

Quote:

And you can use them with channel messages, except they treat a wrapped line as several different lines:


you can use /filter rather than /savebuf to prevent that

Joined: Jan 2004
Posts: 2,081
M
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
M
Joined: Jan 2004
Posts: 2,081
thanks, at least i know i'm not doing something wrong to cause it to fail.

Using /filter looks to be more compatible, though at first glance it looks like it handles line markers as if they're a blank line. logfile is less compatible because it won't contain echo -g lines, and join/quit/part/etc events won't be in the correct color.


Link Copied to Clipboard