I need help finding a way to make my program do an action only when a certain other program is running.
I have tried a while
loop
While process.getprocessbyname("process name").Length != 0
{
//what i want to execute
}
I want my program to run an action only once when a certain process is running. This question is not about finding how I can know if a process is running because I already know how to do so but in fact I am trying to execute a action when a process is running.