user32462308 Posted November 18, 2013 Posted November 18, 2013 Hi, I'm new to Autoit, but I'm hoping you guys can help me out. Is there an "Autoit" way to get the number of threads a process is using, given the process id (PID)? I know about ProcessList and ProcessGetStats, but neither of those have the current number of threads running for a process. I tried searching around, and couldn't find anything. I might just be bad at searching. Thanks!
Solution user32462308 Posted November 18, 2013 Author Solution Posted November 18, 2013 (edited) Nevermind, I found this function via pastebin that executes a WMI query: http://pastebin.com/jdnE6ZLG I just used the QueryWMI function to select ThreadCount from Win32_Process as seen below: $pid = Run("notepad.exe") ConsoleWrite(QueryWMI("SELECT * FROM Win32_Process WHERE ProcessId = " & $pid & " DISPLAY ThreadCount")) There is probably a better way, but this worked for me. Edited November 18, 2013 by user32462308
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