#include <WinAPIEx.au3>
#include <Process.au3>
Opt('MustDeclareVars', 1)
Global $iMemory = 0, $bb,$aList, $aData, $sProcess = 'chrome.exe',$pid1,$Mem
$aList = ProcessList($sProcess)
If Not $aList[0][0] Then
MsgBox(0, 'Память', 'Нет процессов ' & $sProcess)
Exit
EndIf
For $i = 1 To $aList[0][0]
$aData = _WinAPI_GetProcessMemoryInfo($aList[$i][1])
If IsArray($aData) Then
$iMemory += $aData[2]
EndIf
Next
MsgBox(0, 'Память', $sProcess & ' жрет всего: ' & $iMemory)
Switch $iMemory
Case 0 To 1024
$iMemory = $iMemory & ' b'
Case 1024 To 1048576
$iMemory = Round($iMemory / 1024, 2) & ' kb.'
Case Else
$iMemory = Round($iMemory / 1048576, 2) & ' Mb.'
EndSwitch
MsgBox(0, 'Память', $sProcess & ' жрет всего: ' & $iMemory)
$PID1 = 'crome.exe' ;Название процеса
;run($PID) ;запускаем блокнот
;ProcessWait($PID) ;ждём появдение процеса
$Mem = MemGetStats($PID1) ;Узнаём о памяти процеса
MsgBox(0, 'PID', $Mem[5] / 1024 & ' Kб')