Download Süresi Hesablama Kodu

menu Menubar {
&Download Süre Hesaplayıcı
.&Çalıştır:{ dcalc }
.&Addonu mIRC’den Sil:{ .unload -rs $+(“,$script,”) }
}
dialog dCalc {
title “Download Calculator – [/dcalc]”
size -1 -1 157 59
option dbu
box “Ayarlar:”, 1, 2 1 153 43
text “Dosya Boyutu”, 2, 5 9 41 8, center
edit “”, 3, 48 7 70 11, autohs center
combo 4, 120 7 32 48, drop size
text “Internet Hızın:”, 5, 5 21 41 8, center
edit “”, 6, 48 19 70 11, autohs center
combo 7, 120 19 32 49, drop size
edit “0s”, 8, 4 31 148 10, autohs center read
combo 9, 2 46 26 50, drop size
button “Hesapla !”, 10, 84 46 35 11, default
button “&Kapat”, 11, 120 46 35 11, cancel
}
on *:dialog:dCalc:*:*:{
if ($devent == init) {
var %c = byte,kB,MB,GB,TB,PB, %i = byte/s,kB/s,MB/s,GB/s,TB/s, %o = y,M,w,d,h,m,s, %v = c 4,i 7,o 9, %x = 0
while (%x < $numtok(%v,44)) { inc %x 1 var %y = 0, %z = % [ $+ [ $gettok($gettok(%v,%x,44),1,32)) ] ] while (%y < $numtok(%z,44)) { inc %y 1 did -a $dname $gettok($gettok(%v,%x,44),2,32) $gettok(%z,%y,44) } } did -c $dname 4,7,9 3 ; It was either this or three while loops ... In the long run, I thought this would be easier. } if ($devent == sclick) { if ($did == 10) { if (($did($dname,3).text isnum) && ($did($dname,6).text isnum)) { did -ra $dname 8 $s2l($dtime($did($dname,3).text,$did($dname,6).tex t,$did($dname,4).seltext,$did($dname,7).seltext),$ did($dname,9).seltext).peak } else { noop $input(Please make sure filesize and connection speed are numerical values.,ouw,Calculation error!) } } } } on *:load:{ linesep echo -aci2t "Info text" * Download Calculator v4.0 by Jigsy. (JigsWithoutWoodstock@gmail.com, Or should I?) echo -aci2t background  echo -aci2t "Info text" * To run the addon simply type "/dcalc" or select Download Calculator from the Menubar. echo -aci2t "Info text" * If you have any other comments, ideas or questions feel free to e-mail me at the stated address. echo -a 1,14 Download Süre Hesaplayıcı addonu Türkçe Çeviren by 7absolut 11www.mircclub.org 4sitesinden indirilmiştir. linesep } on *:unload:{ echo -acei2t "Info text" * Download Calculator v4.0 has been unloaded. } ; /alias(es) and $identifier(s). alias dcalc { if (!$dialog(dCalc)) { dialog -m dCalc dCalc } } alias dtime { if (($1 isnum) && ($2 isnum)) { var %i = $iif($3,$iif($findtok(byte kB MB GB TB PB,$3,1,32),$calc($v1 - 1),0),0), %x = $iif($4,$iif($findtok(byte/s kB/s MB/s GB/s TB/s,$4,1,32),$calc($v1 - 1),0),0) return $calc($calc($1 * 1024 ^ %i) / ($2 * 1024 ^ %x)) } } alias s2l { if (($isid) && ($1 isnum)) { var %i = $1, %v = y 31536000,M 2592000,w 604800,d 86400,h 3600,m 60,s 1, %x = $iif($findtok(%v,$matchtokcs(%v,$iif($2,$v1,y),1,4 4),1,44),$calc($v1 - 1),0) while (%x < $numtok(%v,44)) { inc %x 1 var %n = $int($calc(%i / $gettok($gettok(%v,%x,44),2,32))) if (%n $iif($prop == peak,>,>=) 0) {
var %s2l = %s2l $+(%n,$gettok($gettok(%v,%x,44),1,32)), %i = $calc(%i % $gettok($gettok(%v,%x,44),2,32))
}
}
return $iif(%s2l,$v1,0s)
}
}

Leave a Reply

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir