mIRC Home    About    Download    Register    News    Help

Print Thread
How to: save open conversations when restarting? #236809 26/03/12 09:15 PM
Joined: Mar 2012
Posts: 3
D
dyaballikl Offline OP
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Mar 2012
Posts: 3
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?

Re: How to: save open conversations when restarting? [Re: dyaballikl] #236810 26/03/12 09:29 PM
Joined: Jan 2004
Posts: 1,274
L
Loki12583 Online
Hoopy frood
Online
Hoopy frood
L
Joined: Jan 2004
Posts: 1,274
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.

Re: How to: save open conversations when restarting? [Re: dyaballikl] #236811 26/03/12 09:29 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
With a script. There have been a few window/state/session restoring scripts posted on the forums, but you can also try script sites.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: How to: save open conversations when restarting? [Re: Loki12583] #236812 26/03/12 10:12 PM
Joined: Mar 2012
Posts: 3
D
dyaballikl Offline OP
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Mar 2012
Posts: 3
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?

Re: How to: save open conversations when restarting? [Re: dyaballikl] #236827 27/03/12 03:00 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
His post explains how to do that. He was saying that you wouldn't need to implement session restore for channels, just query windows.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: How to: save open conversations when restarting? [Re: dyaballikl] #236830 27/03/12 06:46 PM
Joined: Mar 2012
Posts: 38
Twitch Offline
Ameglian cow
Offline
Ameglian cow
Joined: Mar 2012
Posts: 38
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...


Lost in your digital reality.
#mIRC / #Helpdesk on DALnet.
Re: How to: save open conversations when restarting? [Re: Twitch] #236843 28/03/12 01:34 AM
Joined: Mar 2012
Posts: 3
D
dyaballikl Offline OP
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Mar 2012
Posts: 3
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!

Re: How to: save open conversations when restarting? [Re: dyaballikl] #236844 28/03/12 01:53 AM
Joined: Mar 2012
Posts: 38
Twitch Offline
Ameglian cow
Offline
Ameglian cow
Joined: Mar 2012
Posts: 38
remotes (alt+r)


Lost in your digital reality.
#mIRC / #Helpdesk on DALnet.
Re: How to: save open conversations when restarting? [Re: dyaballikl] #236847 28/03/12 10:10 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
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.


Invision Support
#Invision on irc.irchighway.net