HankHell Posted February 2, 2020 Posted February 2, 2020 (edited) made some code a while back to figure out what was running on a system and it got me curious... is there a UDF out there that you can determine cpu usage per each window somehow? anyways... as always, here's some code below: #include <MsgBoxConstants.au3> #include <GUIConstants.au3> GUICreate("handleview", 300, 600, @DesktopWidth/2, @DesktopHeight/2) $ListView = GUICtrlCreateListView("Program|HWND", 1, 1, 298, 598) ProgramFind() GUISetState(@SW_SHOW) While 1 Sleep(10) SwitchCheck() WEnd Func SwitchCheck() $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch EndFunc Func ProgramFind() Local $List = WinList() For $i = 1 To $List[0][0] GUICtrlCreateListViewItem($List[$i][0]&"|"&$List[$i][1], $ListView) Next EndFunc kinda curious how you directly call the memory in autoit, like outputting the data of "0x00010000" to console or something, would be nice to know... been looking at the functions, but can't seem to output the data directly from a hex-specific memory address Edited February 2, 2020 by HankHell
HankHell Posted February 2, 2020 Author Posted February 2, 2020 (edited) I know in C++ it's like this... { ReadProcessMemory(handle, (PBYTE*)0x00REPLACEWITHMEMORYADDRESS, &readcurrentvalue, sizeof(readcurrentvalue), 0); cout << readcurrentvalue << end1; Sleep(1000); WriteProcessMemory(handle, (LPVOID)0x00REPLACEWITHMEMORYADDRESS, &writenewvalue, sizeof(writenewvalue), 0); } and so on and so-forth... it's really simple... and I could use #include with my C++ script... I'm just wondering if it's possible to do with only autoit... Edited February 2, 2020 by HankHell
Nine Posted February 2, 2020 Posted February 2, 2020 You can use WMI Win32_Process to calculate the CPU usage per process. The UserModeTime and KernelModeTime give you separate usage of CPU. Add them to get total CPU usage. You need to create an interval and request the informations at the beginning and the end of the interval. You get this way CPU usage per process in real time. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now