mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2012
Posts: 3
D
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?

Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
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.

Joined: Oct 2003
Posts: 3,918
A
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"
Joined: Mar 2012
Posts: 3
D
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?

Joined: Oct 2003
Posts: 3,918
A
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"
Joined: Mar 2012
Posts: 38
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.
Joined: Mar 2012
Posts: 3
D
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!

Joined: Mar 2012
Posts: 38
Ameglian cow
Offline
Ameglian cow
Joined: Mar 2012
Posts: 38
remotes (alt+r)


Lost in your digital reality.
#mIRC / #Helpdesk on DALnet.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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

Link Copied to Clipboard