kenj Posted April 9, 2009 Share Posted April 9, 2009 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; } Link to comment Share on other sites More sharing options...
Authenticity Posted April 9, 2009 Share Posted April 9, 2009 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. Link to comment Share on other sites More sharing options...
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