Get process IDs by Name w/ exclude IDs

I am not really sure how to start or word this.

I managed to find how to get the process ID by name, but i am having a new dilemma.

I need to get the process ID of an exe by the name of the exe, but if the exe is already open it needs to ignore those process ids.

For example.

If i have 6 "notepad.exe" open, i need my application to ignore the 6 already running and wait for a new one to open, then save that process id in a variable.

Can anyone help me with this?

Thanks.
Topic archived. No new replies allowed.