mIRC Home    About    Download    Register    News    Help

Print Thread
#83634 21/05/04 04:32 AM
Joined: May 2004
Posts: 1
B
Bogey Offline OP
Mostly harmless
OP Offline
Mostly harmless
B
Joined: May 2004
Posts: 1
trying to do an alias to show my total download speed on dcc sends.. heres what i have so far..

Code:
 
alias test {
  var %a 0
  var %b 0
  :loop
  inc %a
  if ($get(%a).done == $false) { var %b $calc((%b) + $get(%a).cps) }
  if (%a == $get(0)) { goto end }
  :end
  echo -a $get(0) downloads, Total Speed is %b
}

 


do i have the wrong approach? is there a better way, what am i doing wrong.. Its only showing the speed on the first dcc.

#83635 21/05/04 10:23 AM
Joined: Sep 2003
Posts: 93
T
Babel fish
Offline
Babel fish
T
Joined: Sep 2003
Posts: 93
This is part of my titlebar... works perfectly. (note: I did not write this code... not sure of the author but kudos to him/her) smile
alias checkgetbw {
set %bandwidthtemp 1
set %bandwidthtemp2 0
while %bandwidthtemp <= $get(0) {
if $get(%bandwidthtemp).status == active {
%bandwidthtemp2 = %bandwidthtemp2 + $get(%bandwidthtemp).cps
}
inc %bandwidthtemp
}
unset %bandwidthtemp
return $round($calc(%bandwidthtemp2 / 1024),2)
echo -a xfer: $checkgetbw $+ k/s down
}

Not sure if the echo part works... like I said it's part of my titlebar in my mirc.

Give the coding a try - see what happens.

Last edited by Talea; 21/05/04 10:28 AM.

Link Copied to Clipboard