PeterlFF Posted March 28, 2022 Posted March 28, 2022 I am using Process Monitor and I see data in the Operation column that I would like to check for and have autoit code react to. I only see 2 function related to processes and they are _ProcessGetName and ProcessList. Is it possible to see the Process Name and Operation with autoit? I did some searching and saw one person trying to capture the output of Process Monitor. I couldn't get the code to work and I am unsure if that is the way I need to go or not. Can anyone point me in the right direction?
ad777 Posted March 29, 2022 Posted March 29, 2022 13 hours ago, PeterlFF said: I only see 2 function related to processes and they are _ProcessGetName and ProcessList. there is more then 2 see link below: https://www.autoitscript.com/autoit3/docs/functions/Process Management.htm https://www.autoitscript.com/autoit3/docs/libfunctions/WinAPIEx Process Management.htm none
PeterlFF Posted March 29, 2022 Author Posted March 29, 2022 Thanks. Not sure how I missed all of those. Looking through them to see if any will help me get the Operation info I see with Process Monitor.
PeterlFF Posted March 29, 2022 Author Posted March 29, 2022 Went through the functions @ad777 pointed out to me and I don't see what I am looking for. I don't see what I want in Task Manager but if I look in Process Monitor I see the Operation info which is what I want (see Operation column in attached image). I don't want Process Monitor running so I won't be able to pull data from it directly but I assume it is getting this info from Windows anyway. Any suggestions on where I can find this info with AutoIT?
ad777 Posted March 29, 2022 Posted March 29, 2022 (edited) @PeterlFF this should help ya: https://www.autoitscript.com/autoit3/docs/libfunctions/_WinAPI_GetGUIThreadInfo.htm https://www.autoitscript.com/autoit3/docs/libfunctions/_WinAPI_GetWindowThreadProcessId.htm https://www.autoitscript.com/autoit3/docs/libfunctions/_WinAPI_EnumProcessModules.htmhttps://www.autoitscript.com/autoit3/docs/libfunctions/_WinAPI_EnumProcessThreads.htm https://www.autoitscript.com/autoit3/docs/libfunctions/_WinAPI_GetModuleInformation.htm https://www.autoitscript.com/autoit3/docs/libfunctions/_WinAPI_EnumResourceNames.htm https://www.autoitscript.com/autoit3/docs/libfunctions/_WinAPI_GetProcAddress.htm https://www.autoitscript.com/autoit3/docs/functions/FileGetVersion.htm Edited March 29, 2022 by ad777 none
PeterlFF Posted April 5, 2022 Author Posted April 5, 2022 @ad777 I have been looking at the 2 apps in the link you provided (the old one and the newer one) and the links to the functions, and I can't figure out how they can get the Operation info for a running process (where it shows things like 'Thread Create' and 'Thread Exit'). I'm still pretty green when it comes to AutoIT so maybe I just can't grasp it. Can you or anyone else give me a little more direction?
rsn Posted November 1, 2022 Posted November 1, 2022 I see this is an old-ish thread but it intrigued me. WMI has some process and thread management classes but coordinating the information might be tough. Many apps will spawn and terminate threads even when idle, thus making those events difficult to correlate to any direct action in an app. That said, process monitor can be run minimized (see it's help file for more info) and capture the info you're hoping to take action against. It can also be run silently if you script it out via psexec. All that said, what's it that you're trying to do?
PeterlFF Posted November 1, 2022 Author Posted November 1, 2022 @rsnThanks for taking an interest. I was trying to time how long certain actions took in Power BI. I looked into using processes trying to find one that started/ended when it was done rendering the visuals but couldn't find a way to make it work. I ended up using PixelChecksum to compare the app window to itself until there were no longer any pixel changes. Had it loop for an extra 8 seconds in case there were any late pixel changes. It works well for me so I stopped looking into the events/process stuff.
rsn Posted November 1, 2022 Posted November 1, 2022 Ah, PowerBI, an old nemesis of mine. Glad you got it sorted.
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