Open Program, if open Restore Program?

This one has been stumping me. It should be simple... I have a button. Ideally I want it to work like this:
Click button
if program isn't open, open it
if program is open, restore it to view

I decided to use wscript to open it. Whether I use that or a shortcut, either way it still opens a new instance of the program. The best I have come to is to have the button parse running Processes, and if the exe is running do nothing at all. I've tried all the wscript run methods.

How can I restore it without opening a new instance?
2,079 views 2 replies
Reply #1 Top
This might help some.

Most of the coders here are self-taught.  Googling and asking about any responses might encourage more advanced people to help.
Reply #2 Top
I've googled it to death. The key press sequence was really helpful. Thanks.