title: Get CPU usage with AppleScript
body: <p>I have an AppleScript:</p>
  
  <pre><code>on run
      set pathName to "/Users/Alexander/Documents/GeekTool/DiskCapacityMeter"
      set usedSpace to (do shell script "df -hl | grep 'disk0s2' | awk '{sub(/%/, \"\");print $5}'") as integer
  
      set theNumber to (round (usedSpace / 5)) * 5
  
      do shell script ("cp " &amp; pathName &amp; "/img/" &amp; theNumber &amp; ".png " &amp; pathName &amp; "/temp.png")
  end run
  </code></pre>
  
  <p>(downloaded from: <a href="http://cl.ly/ANko" rel="nofollow">Here</a>)</p>
  
  <p>I wanna change this script to show my CPU usage instead of my disc capacity, and since i really don't know any AppleScript, i have no clue how to change it.</p>
  
  <p>I just know i need to change this part:</p>
  
  <pre><code>(do shell script "df -hl | grep 'disk0s2' | awk '{sub(/%/, \"\");print $5}'")
  </code></pre>
  
  <p>to give me my CPU usage instead of my disc capacity.. if it's even possible to get my CPU usage this way?</p>
  
  <p>edit*
  There are 11 picures associated with this script (0-10.png) and a twelfth picture (temp.png) that changes to one of the first 11 depending on the number generated by the script.</p>