Valik Posted July 20, 2004 Share Posted July 20, 2004 Jon, since you rejected the first enumeration method I submitted, I've decided to try a different approach. Since PID's are now accepted in all the process functions, ProcessEnumerate() could return an array of every PID in the system. Then, in order to find the name, an additional function could be added which returns the name of a process based on its PID. Some example code might look like: $pids = ProcessEnumerate() For $i = 1 To $pids[0] If ProcessName($pids[$i]) = "notepad.exe" Then ; Do something EndIf Next Would this be a better fit? Link to comment Share on other sites More sharing options...
Administrators Jon Posted July 20, 2004 Administrators Share Posted July 20, 2004 Yeah, I like that. Maybe a optional parameter for Enumerate too that can specifiy what is returned - names or pids. And maybe a general conversion pid <-> name function. If the parameter is a number then assume pid and return name, if the parameter is a string then assume name and return pid. Or something? I intend to do something similar for window titles too. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Valik Posted July 20, 2004 Author Share Posted July 20, 2004 Both of those sound good, Jon. I'll incoporate both of those ideas. Link to comment Share on other sites More sharing options...
Holger Posted July 20, 2004 Share Posted July 20, 2004 Ohhh, very good idea so the base functionality is already in the ProcessExists-function...yeahhh, would be great Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Link to comment Share on other sites More sharing options...
ezzetabi Posted July 21, 2004 Share Posted July 21, 2004 So we'll can make a 100% autoit task manager Link to comment Share on other sites More sharing options...
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