Sign in to follow this  
Followers 0
kenj

Open Program if Closed

2 posts in this topic

I have a program that loose connectivity from time to time and when this happens it needs to be closed and then reopened. However, if the program is not open in the first place I'd need it to opened to start the process. How can this be done.

I've included a basic logic example of what I am looking to do:

if(Program IS open)

{

if(error="No Connection")

{

Close It

Open It

Click Here...Here...Here

return;

}

else

{

return;

}

}

else

{

Open It

Click Here...Here...Here

return;

}

Share this post


Link to post
Share on other sites



Get the process name of your program. Then, call ProcessExists() using the process name. Checking for connectivity of the program... if it's sufficient to ping and see what is the return value then you can use this approach or look here.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0