mIRC Homepage
I have several chans open and a lot of private conversations. I have to reboot my computer, but I would like for those channels and conversations to still be there when I reopen mIRC. Is there a way to do this?
I can't write the entire thing this moment, but on close you would save your open windows to a file. A single alias could be called on each server using scid -a. This alias would loop through $chan(i) and $query(i) and use $status for the server status (so you know if you want to connect or not on start). On start, you would go through these saved values.

Of course, rather than saving a session it may be better just to have mIRC connect to your prefered channels and servers on start, and just restore the state of any query windows you had open.
With a script. There have been a few window/state/session restoring scripts posted on the forums, but you can also try script sites.
Originally Posted By: Loki12583
just restore the state of any query windows you had open.
This sounds like what I'm going for. How do you do this?
His post explains how to do that. He was saying that you wouldn't need to implement session restore for channels, just query windows.
here is a quick script i whipped up, this 'should' do the trick for query windows..

Code:
;--/queryslall [save|load]
alias queryslall {
  if ($1 == save) {
    remini queryslist.ini querys
    scid -at1 if ($gtqueryls != $!null) { writeini queryslist.ini querys $!network $!gtqueryls }
  }
  elseif ($1 == load) { scid -at1 ldqueryls $!network }
}
;--/ldqueryls $network
alias ldqueryls {
  var %x = 1, %t = $readini(queryslist.ini,querys,$1)
  while (%x <= $numtok(%t,32)) { query -n $gettok(%t,%x,32) | inc %x }
}
;--basic alias to get the open query list...
alias gtqueryls { while ($query($0)) tokenize 32 $1- $v1 | return $2- }


basically, 'on EXIT', you would call: /queryslall save
then 'on CONNECT', just call: /ldqueryls $network

you could also, wait until you're done connecting to everything, and call: /queryslall load


not very flashy, but it should do what you need it to...
Originally Posted By: Twitch
here is a quick script i whipped up, this 'should' do the trick for query windows..

Code:
;--/queryslall [save|load]
alias queryslall {
  if ($1 == save) {
    remini queryslist.ini querys
    scid -at1 if ($gtqueryls != $!null) { writeini queryslist.ini querys $!network $!gtqueryls }
  }
  elseif ($1 == load) { scid -at1 ldqueryls $!network }
}
;--/ldqueryls $network
alias ldqueryls {
  var %x = 1, %t = $readini(queryslist.ini,querys,$1)
  while (%x <= $numtok(%t,32)) { query -n $gettok(%t,%x,32) | inc %x }
}
;--basic alias to get the open query list...
alias gtqueryls { while ($query($0)) tokenize 32 $1- $v1 | return $2- }


basically, 'on EXIT', you would call: /queryslall save
then 'on CONNECT', just call: /ldqueryls $network

you could also, wait until you're done connecting to everything, and call: /queryslall load


not very flashy, but it should do what you need it to...
Nice, this is just what I needed. One further question, though: I opened up scripts editor to paste this in, but under which tab do I paste it? Aliases, Popups, Remote, Users, or Variables? I know nothing about these scripts!
remotes (alt+r)
Any scripts on these forums should be in remotes like Twitch mentioned unless it specifically tells you something else. Also, you should get in the habit of doing File > New when adding any scripts. Certain scripts will conflict if placed in the same file, so if you always put new scripts in new files even if the specific script won't conflict, you'll avoid running into that problem.
© mIRC Discussion Forums