|
Joined: Feb 2003
Posts: 3,412
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,412 |
Somone that have any good idea how to calc the space of my HD's, and also show it in a %var ?? like total/free .. i tryed to use moo.dll , but it gives way to much info, and to strip it down would be to much work, it would be a huge script for a simple thing.. somone that have any other idea then moo.dll ?
|
|
|
|
pleur
|
pleur
|
yeh, it's kinda easy to create your own DLL's, so you can make an output as you wish i saw a tut lately, just use google it ain't that hard, it's just a bit difficulter then mIRC scripting, but i pays you real bucks
|
|
|
|
Joined: Dec 2002
Posts: 2,884
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,884 |
Take a look at $disk in the helpfile.
|
|
|
|
Joined: Feb 2003
Posts: 3,412
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,412 |
I never even tryed to make a DLL befor.. so dont say it easy, it's like tell me i can fly if i make me self wings of feders  and i tryed to use $disk, but couldent get it to do what i wanted it to.. so dunno if i did somthing wrong, but the size of the disks was wrong.. :tongue:
|
|
|
|
Joined: Dec 2002
Posts: 2,884
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,884 |
$disk works perfectly for me, exactly as it says in the helpfile. The .free and .size properties return the size of the hard drive in bytes. eg. //echo -a $bytes($disk(c:).free).suf $+ / $+ $bytes($disk(c:).size).suf
|
|
|
|
Joined: Jan 2003
Posts: 1,057
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 1,057 |
{
var %drives = CDEFGHIJKLMNOPQRSTUVWXYZ , %count = 1
while ($mid(%drives,%count,1)) {
var %current = $mid(%drives,%count,1)
if ($disk(%current).type == fixed) {
var %hdinfo = $iif(%hdinfo,%hdinfo 3|) 3[14 $+ %current $+ 3:14 $+ $upper($left($disk(%current).label,1)) $+ $lower($right($disk(%current).label,-1)) $+ 3]: $gettok($bytes($calc($disk(%current).size - $disk(%current).free),m),1,46) $+ 3/ $+ $gettok($bytes($disk(%current).size,m),1,46) 3( $+ $round($calc((($disk(%current).size - $disk(%current).free) / $disk(%current).size) * 100),2) $+ $chr(37) $+ 3) 3( $+ $doqstatsbar($int($calc((($disk(%current).size - $disk(%current).free) / $disk(%current).size) * 100)),14) $+ 3)
}
inc %count
}
return %hdinfo
}
this is the code I use... it searches through all your local drives but skips cd-rom and network drives (aswell as A+B which are reserved for disk stations) PS: it shows used / total, instead of free / total btw...
|
|
|
|
Joined: Feb 2003
Posts: 3,412
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,412 |
What in your code making it skip CD-rom's ?? i have been tryinh a while now.. and i cant get it to skip my CD-rom's
|
|
|
|
Joined: Dec 2002
Posts: 3,015
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,015 |
if ($disk(%current).type == fixed) {
For cdroms $disk(%current).type returns cdrom.
It can also return "removable", don't know if there are any others.
|
|
|
|
Joined: Jan 2003
Posts: 2,125
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,125 |
Btw, remember that mirc now supports $disk(N), which lets you use an index, for example you can use $disk(5) to get the properties of the 5th disk. So you could find the total number of disks with $disk(0) and then use $disk(%i).property to get the various properties. This way you don't have to loop 24 times but $disk(0) times.
|
|
|
|
Joined: Feb 2003
Posts: 3,412
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,412 |
|
|
|
|
Joined: Jan 2003
Posts: 1,057
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 1,057 |
the original script was written for mIRC 5.91 *G* but thnx, didn't know that!
|
|
|
|
|