mIRC Home    About    Download    Register    News    Help

Print Thread
script for remembering opened windows #25210 20/05/03 11:12 AM
Joined: May 2003
Posts: 78
M
MauS Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: May 2003
Posts: 78
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?


-= endless in a victory of a yourself =-
Re: script for remembering opened windows #25211 20/05/03 12:11 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
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.

Re: script for remembering opened windows #25212 20/05/03 12:15 PM
Joined: May 2003
Posts: 78
M
MauS Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: May 2003
Posts: 78
The script can apply restoring windows on connect and then make whois. Aren't i right?


-= endless in a victory of a yourself =-
Re: script for remembering opened windows #25213 20/05/03 12:29 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
u want it to work only for servers that connected??

Re: script for remembering opened windows #25214 20/05/03 12:44 PM
Joined: May 2003
Posts: 78
M
MauS Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: May 2003
Posts: 78
Well, yes. I don't use mIRC when it's not connected. And mostly work with a single server.


-= endless in a victory of a yourself =-
Re: script for remembering opened windows #25215 20/05/03 01:23 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
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.
Re: script for remembering opened windows #25216 20/05/03 01:36 PM
Joined: May 2003
Posts: 78
M
MauS Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: May 2003
Posts: 78
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?


-= endless in a victory of a yourself =-
Re: script for remembering opened windows #25217 20/05/03 01:48 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
i told ya, u can't know which servers are open when u exit
becuz the mirc first DISCONNECTED and then trigger this event

Re: script for remembering opened windows #25218 20/05/03 01:49 PM
Joined: Apr 2003
Posts: 414
Adrenalin Offline
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 414
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 ..


mIRC Chm Help 6.16.0.3 Full Anchored!
Re: script for remembering opened windows #25219 20/05/03 01:52 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
that's not the problem, read what i said.
and why use $comchan() when u can use $chan().

Re: script for remembering opened windows #25220 20/05/03 02:08 PM
Joined: May 2003
Posts: 78
M
MauS Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: May 2003
Posts: 78
And when it's disconnected, it's impossible to get what windows are open?


-= endless in a victory of a yourself =-
Re: script for remembering opened windows #25221 20/05/03 02:21 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
it IS possible but the problem is that it won't know what is the server for those windows

Re: script for remembering opened windows #25222 20/05/03 02:52 PM
Joined: May 2003
Posts: 78
M
MauS Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: May 2003
Posts: 78
Then its all right...

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


-= endless in a victory of a yourself =-
Re: script for remembering opened windows #25223 20/05/03 03:50 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
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()