Advertisement
SpecialG

SysInfo

May 19th, 2013
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.80 KB | None | 0 0
  1. ;Sysinfo Script
  2. ;Made by Adorable
  3.  
  4. alias -l WbemOpen {
  5.   .comopen Wbem.1 WbemScripting.SWbemLocator
  6.   .comclose Wbem.1 $com(Wbem.1,ConnectServer,3,dispatch* Wbem.2)
  7. }
  8. alias -l WbemGet {
  9.   if ($com(Wbem.3)) { .comclose Wbem.3 }
  10.   if ($com(Wbem.2,ExecQuery,3,bstr*,select $2 from $1,dispatch* Wbem.3)) { var %Result $comval(Wbem.3,$3,$2) }
  11.   .comclose Wbem.3
  12.   return %Result
  13. }
  14. alias QuickDisk {
  15.   var %x $disk(0), %total 0, %free 0
  16.   while (%x) {
  17.     if (%d != f) {
  18.       %total = $calc(%total + $disk(%x).size)
  19.       %free = $calc(%free + $disk(%x).free)
  20.     }
  21.     dec %x
  22.   }
  23.   return 10Disk Space: 12Total 10-04 $bytes(%total).suf 12Free 10-04 $bytes(%free).suf
  24. }
  25. alias RAM {
  26.   if (!$com(Wbem.2)) { WbemOpen }
  27.   return 10RAM:12 Total 10-04 $round($calc($WbemGet(Win32_OperatingSystem,TotalVisibleMemorySize,1)/1048576),2) $+ GB 12Free 10- 04 $+ $round($calc($WbemGet(Win32_OperatingSystem,FreePhysicalMemory,1)/1048576),2) $+ GB
  28. }
  29. alias gpu return 10GPU:12 $WbemGet(Win32_VideoController,AdapterCompatibility,1) 10-04 $WbemGet(Win32_VideoController,VideoProcessor,1)
  30. alias cpu {
  31.   .comopen Processor WbemScripting.SWbemLocator
  32.   if (!$comerr) {
  33.     if ($com(Processor, ConnectServer, 3, dispatch* Specs)) {
  34.       if ($com(Specs, Get, 3, string, Win32_Processor.DeviceID='CPU0', dispatch* Results)) {
  35.         var %m, %n, %l
  36.         if ($com(Results, Manufacturer, 3)) { %m = $com(Results).result }
  37.         if ($com(Results, Name, 3)) { %n = $com(Results).result }
  38.         if ($com(Results, LoadPercentage, 3)) { %l = $com(Results).result }
  39.         .comclose Results
  40.       }
  41.       .comclose Specs
  42.     }
  43.     .comclose Processor
  44.     return 10CPU:12 %m 10-04 %n 12load 10-04 %l $+ %
  45.   }
  46.   else { .comclose Processor | return }
  47. }
  48. alias SysInfo say $osv $QuickDisk $ram $cpu $gpu
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement