jonas644
15 years agoOccasional Contributor
Process not found.
Hello,
This is probably an easy fault that i've made but i just can't see it.
When i run this and the process doesn't exists i get a error "Process not found".
if ( Sys["Process"]("myprocess")["Exists"] )
{
Sys["Process"]("myprocess")["Terminate"]();
}
But if the process exists it'll work perfectly.
So i don't want this function to return a Error to my log. Any tips?
The reason why i want to do this is because i can't start the application if a instance is already running.
So i wanted to make a control to check if it's running before starting a new instance.
BR
Jonas
This is probably an easy fault that i've made but i just can't see it.
When i run this and the process doesn't exists i get a error "Process not found".
if ( Sys["Process"]("myprocess")["Exists"] )
{
Sys["Process"]("myprocess")["Terminate"]();
}
But if the process exists it'll work perfectly.
So i don't want this function to return a Error to my log. Any tips?
The reason why i want to do this is because i can't start the application if a instance is already running.
So i wanted to make a control to check if it's running before starting a new instance.
BR
Jonas