mIRC Homepage
Posted By: gwong How may I use .wid to close a window - 13/10/03 03:13 PM
I like to keep the last CHAT window between my system and a remote open at all times. However, when the remote system changes IP, the old CHAT window is not reused. Instead a new CHAT window is create. Hence for remote systems with dynaimc IPs, I start accumulating inactive CHAT windows.

In an attempt to prevent this, I tried to use on 1:OPEN:= to spin through $chat($nick,%i).status and $chat($nick,%i).wid to close all inactive windows tied to the earlier IP for $nick. But I was not able to figure out how to close a window when the only unique qualifer I have to it is .wid. /windows does not accept $wid as an argument.
That brings me to a very interesting point - there is no unique handle that mIRC scripts can use to echo to, close, or otherwise manipulate DCC sessions. Perhaps there should be a feature suggestion on this matter.

Perhaps /window -W, /echo -W to specify window ID's as targets.
Posted By: Online Re: How may I use .wid to close a window - 13/10/03 06:05 PM
Are you using the /dccserver? If you do, this script will close prior chats with the nick that is connecting:
  • On *:dccserver:chat:close -c $nick
Posted By: Online Re: How may I use .wid to close a window - 13/10/03 06:09 PM
This thread might interest you.
Yes, thanks, it is of some interest. But unfortunately that only deals with half of the issue. I wouldn't have much of a reason to identify between uniquely named windows unless I could manipulate them. (Well, I suppose we could record information that can be obtained through $window... but I don't have any reason to yet...)
© mIRC Discussion Forums