mIRC Home    About    Download    Register    News    Help

Print Thread
disk info #62631 02/12/03 07:39 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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 ? smile


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: disk info #62632 02/12/03 08:12 PM
Joined: Oct 2003
Posts: 30
pleur Offline
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2003
Posts: 30
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 wink


------
Cheers m8!
Re: disk info #62633 02/12/03 08:20 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Take a look at $disk in the helpfile.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: disk info #62634 02/12/03 09:53 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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 wink

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:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: disk info #62635 03/12/03 12:02 AM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
$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.
Code:
//echo -a $bytes($disk(c:).free).suf $+ / $+ $bytes($disk(c:).size).suf


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: disk info #62636 03/12/03 10:23 AM
Joined: Jan 2003
Posts: 1,063
D
Doqnach Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
Code:
{
  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...


If it ain't broken, don't fix it!
Re: disk info #62637 03/12/03 11:05 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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 smirk


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: disk info #62638 03/12/03 11:14 AM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
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.

Re: disk info #62639 04/12/03 11:10 AM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: disk info #62640 04/12/03 11:18 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I'm still using 6.03 grin grin grin but thnx anyway smile


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: disk info #62641 04/12/03 01:32 PM
Joined: Jan 2003
Posts: 1,063
D
Doqnach Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
the original script was written for mIRC 5.91 *G* but thnx, didn't know that!


If it ain't broken, don't fix it!