Valik Posted July 20, 2004 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?
Administrators Jon Posted July 20, 2004 Administrators 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.
Valik Posted July 20, 2004 Author Posted July 20, 2004 Both of those sound good, Jon. I'll incoporate both of those ideas.
Holger Posted July 20, 2004 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
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