mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2011
Posts: 53
S
Babel fish
OP Offline
Babel fish
S
Joined: May 2011
Posts: 53
I have a small script which automatically connects to a number of zncs when mirc launches.

However, there is a larger script which loads BEFORE the znc script .. and this causes the entire application to freeze for around 30 seconds.

Is there a way to use a script to load the larger Script A first, then Script B, say .. 20 seconds later?

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
/help /load
/help /timer

Joined: May 2011
Posts: 53
S
Babel fish
OP Offline
Babel fish
S
Joined: May 2011
Posts: 53
Thanks for the reply

My first effort isn't working.


Quote:
on *:START:.timer 1 10 /load -rs znc.mrc


to load the script below after 10 seconds

Quote:
;...:::{ Servers }:::...
on *:START:{
server -m server1 server2 server3


Does the timer 'script' need to be separate, or should the timer simply be added to the beginning of the existing znc.mrc script?


EDIT: it would also be ideal to add a 2-second delay between server1, server2, server3 if possible.

Last edited by sandygws; 08/05/11 03:57 PM.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You can split your server line and put timers on each..

Code:
  .timer 1 2 server irc.server1.com
  .timer 1 4 server -m irc.server2.com
  .timer 1 6 server -m irc.server3.com


Change the delay to whatever works best.

As far as your on start/load option, keep in mind that unless you're unloading the script before exiting, it will be loaded already when you start mIRC. The /load command may reload it, but before that happens, it will already have started doing its on start section.


Invision Support
#Invision on irc.irchighway.net
Joined: May 2011
Posts: 53
S
Babel fish
OP Offline
Babel fish
S
Joined: May 2011
Posts: 53
Thanks Riamus2,

That's a very good point.

Is there no way to unload the script - other than manually - upon mIRC exit?

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
/help /unload

Joined: May 2011
Posts: 53
S
Babel fish
OP Offline
Babel fish
S
Joined: May 2011
Posts: 53
I've already read that - it doesn't help

Without knowing how long I need the script loaded for, how do I tell mIRC to unload it?

As far as I can see, the only way is to either manually unload it before exiting - or to instruct mIRC to unload it upon exit.

But I'm still unsure how to go about that.

Joined: Feb 2011
Posts: 448
K
Pan-dimensional mouse
Offline
Pan-dimensional mouse
K
Joined: Feb 2011
Posts: 448
I think this is what you are looking for.

Code:
on *:EXIT:{ /unload -rs znc.mrc }


/help , Index Tab , search for "on exit"

Edit: corrected typo in the script.

Last edited by KindOne; 08/05/11 07:39 PM.
Joined: May 2011
Posts: 53
S
Babel fish
OP Offline
Babel fish
S
Joined: May 2011
Posts: 53
Thanks smile

Where exactly should I place that text?


I've got


Quote:
.timer 1 38 server -m xxxx
}

on *:EXIT:{ /unload-rs znc.ini }


Or should it go inside the '}' after the server?

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Events need to stand alone, you can't nest them in another event or alias.

on *:text:*:#:{ }
alias name { }
on *:exit:{ }

Joined: May 2011
Posts: 53
S
Babel fish
OP Offline
Babel fish
S
Joined: May 2011
Posts: 53
Thank you!

Joined: Feb 2011
Posts: 448
K
Pan-dimensional mouse
Offline
Pan-dimensional mouse
K
Joined: Feb 2011
Posts: 448
Leave it on the outside, like in it is, I think that will work.
Also, please check my first post, I just corrected a typo that would cause it not to work properly.

Joined: May 2011
Posts: 53
S
Babel fish
OP Offline
Babel fish
S
Joined: May 2011
Posts: 53
Corrected smile

Final question: what's the difference between using script.ini or script.mrc?


Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Nothing really. They are just saved (formatted) differently.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard