http://nickpisca.com/BLAST/index.php?title=GetMayaRAMUsageXPHome&feed=atom&action=historyGetMayaRAMUsageXPHome - Revision history2024-03-29T09:05:08ZRevision history for this page on the wikiMediaWiki 1.28.1http://nickpisca.com/BLAST/index.php?title=GetMayaRAMUsageXPHome&diff=135&oldid=prevNickpisca: Created page with " global proc float GetMayaRAMUsageXPHome() { //Author Nick Pisca 0001d 2010, float $Ram1 = GetMayaRAMUsageXPHome(); string $TLbuffer[]; string $TL = `system ("c:\\pslist.ex..."2017-04-22T05:58:18Z<p>Created page with " global proc float GetMayaRAMUsageXPHome() { //Author Nick Pisca 0001d 2010, float $Ram1 = GetMayaRAMUsageXPHome(); string $TLbuffer[]; string $TL = `system ("c:\\pslist.ex..."</p>
<p><b>New page</b></p><div> global proc float GetMayaRAMUsageXPHome() {<br />
//Author Nick Pisca 0001d 2010, float $Ram1 = GetMayaRAMUsageXPHome();<br />
string $TLbuffer[];<br />
string $TL = `system ("c:\\pslist.exe maya /accepteula")`;<br />
$TLToks = `tokenize $TL " " $TLbuffer`;<br />
int $TLCount = 0;<br />
string $TLMayaUsage = 0;<br />
do {<br />
string $TLX = `match "maya" $TLbuffer[$TLCount]`;<br />
if ($TLX != "") {<br />
$TLMayaUsage = $TLbuffer[($TLCount+5)];<br />
}<br />
$TLCount++;<br />
} while ($TLCount<size($TLbuffer));<br />
string $s2 = `substitute "," $TLMayaUsage ""`;<br />
float $TLMayaDbl = float($s2);<br />
return $TLMayaDbl;<br />
}<br />
<br />
<br />
<br />
<br />
<br />
<br />
NOTE: This function was developed because Windows XP Home does not have the Tasklist function for the cmd prompt. If you are using a newer release of Windows, skip GetMayaRAMUsageXPHome and use the cleaner function: [[GetMayaRAMUsage]]. Also, in order to run this program, you need the tool [http://download.sysinternals.com/Files/PsTools.zip pslist.exe]. Save this on your C: Drive root directory. <br />
<br />
''Related Functions: [[GetMayaRAMUsage]]<br />
<br />
''More information on MEL scripting, read [http://stores.lulu.com/nickpisca YSYT]. <br />
<br />
[[Category:MEL]]</div>Nickpisca