mIRC Homepage
Posted By: Cyber_Axe leave channel without closing the window - 16/08/04 12:32 AM
is there a way to part a channel and have the window stay open?
Posted By: Seifer Re: leave channel without closing the window - 16/08/04 12:40 AM
I'm not sure that there is a way of doing this via scripting alone. There is a dll available at mircscripts.org (wnd.dll) which I believe allows you to do this.
thanks
the readme is not the easyest to understand and ive not really used DLLs much before any chance of an example please?
Posted By: Seifer Re: leave channel without closing the window - 16/08/04 01:48 AM
It's fairly easy to use.

Code:
[color:green];small alias to return the wnd.dll's location[/color]
[color:blue]alias wnd { return $findfile($mircdir,wnd.dll,1).shortfn }[/color]

[color:green];this is the signal used by the dll[/color]
[color:blue]on *:SIGNAL:Wnd: {[/color]

  [color:green];all information sent by the dll will be echoed to
  ;the status window, you can replace this with whatever
  ;you want the script to do when an event occurs.[/color]
[color:blue]  echo -s $1-
}

on ME:*:JOIN:[color:red]#channel[/color]: {[/color]

  [color:green];this will 'hook' the channel window when you join it
  ;replace #channel with the channel name you want to keep
  ;open, or just use # if you want it to work on all channels.[/color]
[color:blue]  dll $wnd hook $window($chan).hwnd
}[/color]


The dll will send a tryclose message to the Wnd signal event when you or mIRC tries to close the channel. You can use something like if ($1 == tryclose) { ... } to catch this and have the script do what you want.

Hope that helps.
thank you
why dont you just use the way built into mIRC?

View > go to the IRC tab and the check off 'keep channels open'
forgot/never knew of its existence, thanks
Posted By: Naz Re: leave channel without closing the window - 16/08/04 11:42 AM
I believe 'keep channels open' only works when you are kicked from a channel. The window closes on me when I use /part and that option is ticked.
Correct, it does. Also, for when you /quit, the channel window stay open. It will not keep a channel window open when you /part it.

Regards,
© mIRC Discussion Forums