-
Hi, I need to know if this is possible:
We have an app that uses the sendkeys command to control another window's app. In order for it to work, the other app needs to be in the foreground (which we all know).
This is the problem: The application runs within a scheduler environment and the problem is when another scheduled job kicks off it maximizes it's own window. If the window we want to control has already been brought to focus, the new window becomes the focus meaning that the sendkeys no longer work.
I need to be able to bring a window to the front AND force the focus to stay until we have finished with the sendkeys and close it.
Any help MUCH appreciated.
Thanks in advance.
al.
-
I think you'd need to have a small extra program running in the background and checking that the window you want is in focus.
You use the API functions : FindWindow() ShowWindow() and BringWindowToTop()