mIRC Homepage
Posted By: MauS script for remembering opened windows - 20/05/03 11:12 AM
Is there a script that remembers opened windows on exit, and next time mIRC is launched, it restores the windows (i mean only channel and query windows)?

It could also check which of them refer to "No such nick/ channel" by /whois <window_name>.


If there's no such script, mabe some ideas on how to make it?
Posted By: ScatMan Re: script for remembering opened windows - 20/05/03 12:11 PM
when u are exit, u can't do a /whois beucz the mirc exit immidealty and won't wait for a response from the server.
and for the first thing, u can make an on exit event and on start but there is a problem, when u exit, the mirc first disconnected from all servers so after u'll run the mirc again the /join won't work becuz it won't know which server to connect.
Posted By: MauS Re: script for remembering opened windows - 20/05/03 12:15 PM
The script can apply restoring windows on connect and then make whois. Aren't i right?
Posted By: ScatMan Re: script for remembering opened windows - 20/05/03 12:29 PM
u want it to work only for servers that connected??
Posted By: MauS Re: script for remembering opened windows - 20/05/03 12:44 PM
Well, yes. I don't use mIRC when it's not connected. And mostly work with a single server.
Posted By: ScatMan Re: script for remembering opened windows - 20/05/03 01:23 PM
well, then, i don't think it's possible
becuz mirc won't know which servers connected and which don't, and it won't know the name of the server too
Posted By: MauS Re: script for remembering opened windows - 20/05/03 01:36 PM
Why not?

On exit: write names of opened channels and queries into a var.
On connect: whois all the names and open those that had response.

Is it really impossible? Why?
Posted By: ScatMan Re: script for remembering opened windows - 20/05/03 01:48 PM
i told ya, u can't know which servers are open when u exit
becuz the mirc first DISCONNECTED and then trigger this event
Posted By: Adrenalin Re: script for remembering opened windows - 20/05/03 01:49 PM
Its is simple ..
$comchan($me,0) - return the number of channel where you are now .. Use an while or Goto function to write all channel to a var .. $comchan($me,n) .. if n = 1 then it will return the 1 channel ..
Posted By: ScatMan Re: script for remembering opened windows - 20/05/03 01:52 PM
that's not the problem, read what i said.
and why use $comchan() when u can use $chan().
Posted By: MauS Re: script for remembering opened windows - 20/05/03 02:08 PM
And when it's disconnected, it's impossible to get what windows are open?
Posted By: ScatMan Re: script for remembering opened windows - 20/05/03 02:21 PM
it IS possible but the problem is that it won't know what is the server for those windows
Posted By: MauS Re: script for remembering opened windows - 20/05/03 02:52 PM
Then its all right...

But how can i get the names of opened queries and
channels?
Posted By: ScatMan Re: script for remembering opened windows - 20/05/03 03:50 PM
for example:
on *:exit:{
var %i = 1
while (%i <= $scon(0)) {
scon %i
;here u put two loops with $query() and $chan()
inc %i
}
}
the loops should be something like this:
var %x = 1
while (%x <= $chan(0)) {
;here is a command that will do something with the $chan(%x)
inc %x
}
for query is the same as that loop but with $query()
© mIRC Discussion Forums