mIRC Home    About    Download    Register    News    Help

Topic Options
#236809 - 26/03/12 10:15 PM How to: save open conversations when restarting?
dyaballikl Offline
Self-satisified door

Registered: 26/03/12
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?

Top
#236810 - 26/03/12 10:29 PM Re: How to: save open conversations when restarting? [Re: dyaballikl]
Loki12583 Offline
Hoopy frood

Registered: 22/01/04
Posts: 1264
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.

Top
#236811 - 26/03/12 10:29 PM Re: How to: save open conversations when restarting? [Re: dyaballikl]
argv0 Offline
Planetary brain

Registered: 13/10/03
Posts: 3918
Loc: Montreal, QC, Canada
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"

Top
#236812 - 26/03/12 11:12 PM Re: How to: save open conversations when restarting? [Re: Loki12583]
dyaballikl Offline
Self-satisified door

Registered: 26/03/12
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?

Top
#236827 - 27/03/12 04:00 PM Re: How to: save open conversations when restarting? [Re: dyaballikl]
argv0 Offline
Planetary brain

Registered: 13/10/03
Posts: 3918
Loc: Montreal, QC, Canada
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"

Top
#236830 - 27/03/12 07:46 PM Re: How to: save open conversations when restarting? [Re: dyaballikl]
Twitch Offline
Ameglian cow

Registered: 20/03/12
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.

Top
#236843 - 28/03/12 02:34 AM Re: How to: save open conversations when restarting? [Re: Twitch]
dyaballikl Offline
Self-satisified door

Registered: 26/03/12
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!

Top
#236844 - 28/03/12 02:53 AM Re: How to: save open conversations when restarting? [Re: dyaballikl]
Twitch Offline
Ameglian cow

Registered: 20/03/12
Posts: 38
remotes (alt+r)
_________________________
Lost in your digital reality.
#mIRC / #Helpdesk on DALnet.

Top
#236847 - 28/03/12 11:10 AM Re: How to: save open conversations when restarting? [Re: dyaballikl]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
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

Top