mIRC Home    About    Download    Register    News    Help

Print Thread
#231708 28/04/11 03:27 PM
Joined: Mar 2011
Posts: 23
S
Sherip Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2011
Posts: 23
I can get /list to print a channel listings to the current window using the following:

raw 322:*: { /echo 5 $1-
haltdef }

... but is there some way to prevent mirc's Channels List window from opening and taking focus?

Sherip #231709 28/04/11 03:42 PM
Joined: Jul 2006
Posts: 4,222
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,222
I don't think so, but what you can hide the window when you receive the raw 321 with /window -h "channels list"

You can also override the list alias and hide the window there, you'll still see it opening but it will hide quicker than with the raw 321:
Code:
alias list {
  !list
  window -h "channels list"
}

Last edited by Wims; 28/04/11 03:50 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #231722 28/04/11 08:04 PM
Joined: Mar 2011
Posts: 23
S
Sherip Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2011
Posts: 23
Thanks Wims. Strangely, I seem to still need the raw 321, at least until the channel list window exists and is hidden. Otherwise I think the alias is trying to hide the window before it exists and I see errors (/window: invalid parameters). Is it possible to also activate the status window? For example, if I enter the /list command in a channel window, its outputting to the status window and I'd like to automatically switch there.

Also, didn't test it without, but I added $1- after !list as I did not want to risk listing every channel. Would it?

Sherip #231723 28/04/11 08:32 PM
Joined: Jul 2006
Posts: 4,222
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,222
Hum yeah it might take some time for the window to open, so I guess you could use the raw 321 as well (I made several test though, $window(channels list) always returns a value inside the list alias for me)
You are right for $1-, I rarely use the /list with parameters.
As for the status window, you can specify where you want the echo, echo -s will echo to the status window.


Code:
raw *:*:{
  if ($istok(321 322 323,$numeric,32)) {
    haltdef
    if ($window(channels list)) window -h "channels list"
    if ($numeric == 321) echo -s Listing channel..
    elseif ($numeric == 322) echo -s $2 $chr(9) $3 $chr(9) $4-
    else echo -s End of /list
  }
}
alias list {
  !list $1-
  window -a "status window"
  if ($window(channels list)) window -h "channels list"
}



#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #231724 28/04/11 09:00 PM
Joined: Mar 2011
Posts: 23
S
Sherip Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Mar 2011
Posts: 23
That looked sweet but I'm not getting anything for raw * event. Does it work for you?

blush Sorry, I goofed, it was all in a commented area.

Will play. Wonder if possible to suppress the beep.

Last edited by Sherip; 28/04/11 09:09 PM.

Link Copied to Clipboard