Advertisement
westor

$cpuload identifier for Korona v1.0

Oct 2nd, 2018
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.42 KB | None | 0 0
  1. ; Thanks to: Wims
  2.  
  3. alias cpuload {
  4.   .comopen a wbemScripting.swbemLocator
  5.   .comclose a $com(a,connectserver,3,bstr,.,bstr,root\cimv2,dispatch* b)
  6.   .comclose b $com(b,execquery,3,bstr,SELECT * FROM Win32_PerfFormattedData_PerfOS_Processor WHERE Name = '_Total' ,dispatch* c)
  7.   var %b = $comval(c,0)
  8.   while (%b) {
  9.     var %r = %r $comval(c,%b,PercentProcessorTime)
  10.     dec %b
  11.   }
  12.   .comclose c
  13.   return $iif(%r,$v1,0)
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement