mIRC Home    About    Download    Register    News    Help

Print Thread
#208794 28/01/09 08:20 PM
Joined: Jan 2009
Posts: 3
O
Self-satisified door
OP Offline
Self-satisified door
O
Joined: Jan 2009
Posts: 3
I used to do some scripting in mIRC a while back, quit for a long while, and have recently started to script in mIRC again. I am looking at other people's scripts to get ideas on how to do things, and have always wondered one thing. I have seen a lot of scripts, and some do command while others do .command. I have never asked before and never thought to ask, but what is the difference? Examples below:

Code:
somealias {
  var %somevar sometext

  echo %somevar
}


Code:
somealias {
  .var %somevar sometext

  .echo %somevar
}

Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
Originally Posted By: /help $
If you want to force a command to perform quietly ie. without printing out any information, then you can prefix it with a "." full stop. For example:

/ignore somenick

Would print out information telling you that you are now ignoring "somenick". If you don't want this information to be displayed, then you can use:

/.ignore somenick




#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jan 2009
Posts: 3
O
Self-satisified door
OP Offline
Self-satisified door
O
Joined: Jan 2009
Posts: 3
Thanks.

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
if hearted that the fullstop . in any alias or remote it decreases the PING , is that true of false? i tested and i saw that when i used any commands starting with the fullstop eg: .var or .while , the script remote runs faster.

Last edited by westor; 29/01/09 04:50 AM.

Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
As long as the commands don't produce echo outputs itself (which can be silenced - thats what the prefix is meant for), it's the same performance.
If you have doubts - run your own test, like:
Code:
alias nonsilenced {
  var %n = 1, %start = $ticks
  while (%n <= 50000) {
    var %a = $ticks
    noop
    inc %n
  }
  echo -a nonsilenced $calc($ticks - %start) ticks
}

alias silenced {
  var %n = 1, %start = $ticks
  .while (%n <= 50000) {
    .var %a = $ticks
    .noop
    .inc %n
  }
  echo -a silenced $calc($ticks - %start) ticks
}

My results (running each alias 3times):
nonsilenced 1687 ticks
nonsilenced 1703 ticks
nonsilenced 1703 ticks
silenced 1703 ticks
silenced 1703 ticks
silenced 1688 ticks
smile

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
i tryied too your aliases and look the resaults:
nonsilenced 5078 ticks
silenced 5015 ticks
nonsilenced 5016 ticks
silenced 4969 ticks


a difference between the fullstop and not is true.

Last edited by westor; 29/01/09 05:28 AM.

Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Run each test several times and take the average. Results of single runs may vary due to e.g. slightly different system load.
Also note that you have 50.000 iterations; 1 tick is 1 millisecond...


Link Copied to Clipboard