mIRC Home    About    Download    Register    News    Help

Print Thread
M
MauS
MauS
M
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?

S
ScatMan
ScatMan
S
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.

M
MauS
MauS
M
The script can apply restoring windows on connect and then make whois. Aren't i right?

S
ScatMan
ScatMan
S
u want it to work only for servers that connected??

M
MauS
MauS
M
Well, yes. I don't use mIRC when it's not connected. And mostly work with a single server.

S
ScatMan
ScatMan
S
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

Last edited by ScatMan; 20/05/03 01:24 PM.
M
MauS
MauS
M
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?

S
ScatMan
ScatMan
S
i told ya, u can't know which servers are open when u exit
becuz the mirc first DISCONNECTED and then trigger this event

Joined: Apr 2003
Posts: 413
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 413
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 ..

S
ScatMan
ScatMan
S
that's not the problem, read what i said.
and why use $comchan() when u can use $chan().

M
MauS
MauS
M
And when it's disconnected, it's impossible to get what windows are open?

S
ScatMan
ScatMan
S
it IS possible but the problem is that it won't know what is the server for those windows

M
MauS
MauS
M
Then its all right...

But how can i get the names of opened queries and
channels?

S
ScatMan
ScatMan
S
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()


Link Copied to Clipboard