AnkurMittal Posted August 9, 2018 Posted August 9, 2018 Hi All, I am new to AutoIT, i want to run resource monitor(resmon), select the CPU tab and select one given process (notepad.exe) right click and Analize Wait Chain. And finally capture the screen shot of this. Issue: I am able to run the resmon using Run('resmon') but after that I am not able to select CPU tab itself or any other control. My environment is Win 10.
Moderators JLogan3o13 Posted August 9, 2018 Moderators Posted August 9, 2018 (edited) Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Expand Moderation Team Edited August 9, 2018 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Earthshine Posted August 9, 2018 Posted August 9, 2018 (edited) post your code for more help so far i have found you can do this ControlCommand("Resource Monitor", "", "SysTabControl321", "TabLeft") ; Or ControlCommand("Resource Monitor", "", "SysTabControl321", "TabRight") See this thread where I found it, also look up CurrentTab so you can find out where you are, and decide how to get where you want to go, left or right and how many. Edited August 9, 2018 by Earthshine My resources are limited. You must ask the right questions
Earthshine Posted August 9, 2018 Posted August 9, 2018 (edited) also!! you need to run as admin, your SciTE editor or use the #requireadmin in the scipt to elevate, else, in Win10 you won't be allowed to touch the resource monitor. Edited August 9, 2018 by Earthshine My resources are limited. You must ask the right questions
AnkurMittal Posted August 9, 2018 Author Posted August 9, 2018 Hi Earthshine, thanks for your quick response, Now i have run my SciTE editor as admin and script is running. Find the code as below for review. #include <MsgBoxConstants.au3> #include <WinAPIProc.au3> #requireadmin Run("resmon") ; AutoItSetOption('MouseCoordMode', 0) Sleep(5000) ; WinWait('Resource Monitor') WinActivate('Resource Monitor') MouseClick($MOUSE_CLICK_PRIMARY, 90, 67, 1, 0) Sleep(2000) ; MouseClick($MOUSE_CLICK_PRIMARY, 93, 214, 1, 0) Send('chrome') Need one more suggestion: as many processes are running and killing, How to select only one 'chrome.exe' so i can do Right Click and get 'Analize Wait Chain' for that process.
Earthshine Posted August 9, 2018 Posted August 9, 2018 (edited) Did you try that line of code that I posted above? You can use the control send functions with that tab bar For selecting your processes? You will use the ListView functions most likely I’ve got work to do but I will whip up a little example later and post it if you haven’t figured it out already later Edited August 9, 2018 by Earthshine My resources are limited. You must ask the right questions
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