Set windows focus from DOS
Posted on 2003-03-13
I have a continuously-running DOS application on an unattended Win95 station. This DOS app MUST have focus for optimum performance. It runs as an app server, polling a queue looking for batch files to execute. Some of those batch files may launch windows apps (which spawn in their own windows, of course) and THOSE apps have splash screens which grab focus, no matter what shortcut or "start /m" settings you use. (The EGO of these people!)
This puts the app server into the background.
What I would like is a command line utility that can switch focus BACK to the app server. I would put it at the end of batch files being executed, forcing Windows to put the app server in the foreground. Given the complexity of Windows processes, etc. I would imagine that the utility would take the app server's windows title as the parameter...
Has anyone written such a beast?