Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
DllHwnd Get Current Process ID PROCID Proc Id GetWindowThreadProcessId
I need memory usage of a process like I see in task manager!
Fisrt, you would need to get the ProcessID of the running script. Then you could use tGetProcInfo from the process extender to retrieve information about the memory usage of the process...
#DefineFunction GetProcessID(h) bb=BinaryAlloc(4) BinaryEODSet(bb,4) dllname=strcat(DirWIndows(1),"user32.dll") DllCall(dllname,long:"GetWindowThreadProcessId",long:h,lpbinary:bb) p=BinaryPeek4(bb,0) return (p) #endFunction ;Addextender("wproc34i.dll") Addextender("wwprc44i.dll") hwnd=DllHwnd("") ; window title goes in here procname = WinExeName("") pid=GetProcessID(hwnd) ret=tGetProcInfo(pid) wss= itemextract(3,ret,@TAB) kb_wss = wss/1024 message("Memory Usage on process %procname%",StrCat(kb_wss," KB"))
Article ID: W15859
File Created: 2017:07:28:13:58:38
Last Updated: 2013:04:01:09:09:04