Difference between revisions of "GetMayaRAMUsage"
From scripting
(Created page with " float $Ram1 = GetMayaRAMUsage(); //Note, this tool only works on Windows XP Pro and newer. Windows XP Home may not run this. global proc float GetMayaRAMUsage() { //Aut...") |
(No difference)
|
Latest revision as of 05:58, 22 April 2017
float $Ram1 = GetMayaRAMUsage(); //Note, this tool only works on Windows XP Pro and newer. Windows XP Home may not run this. global proc float GetMayaRAMUsage() { //Author Nick Pisca 0001d 2010 string $TLbuffer[]; string $TL = `system ("tasklist")`; $TLToks = `tokenize $TL " " $TLbuffer`; int $TLCount = 0; string $TLMayaUsage = 0; do { string $TLX = `match "maya" $TLbuffer[$TLCount]`; if ($TLX != "") { $TLMayaUsage = $TLbuffer[($TLCount+4)]; } $TLCount++; } while ($TLCount<size($TLbuffer)); string $s2 = `substitute "," $TLMayaUsage ""`; float $TLMayaDbl = float($s2); return $TLMayaDbl; }
More information on MEL scripting, read YSYT.