I'm writing a script to install "KB" (Knowledge Base) updates for MS Office
All of the other details aside, is there a way to detect that an application created a child window?
Generally, these install travel fluidly in a series of "YES", "NEXT" or "CONTINUE" buttons The exception is when the KB update is already installed. In this case, a child window opens with, I believe, the same title, and says "already installed", hit OK, at which point it dies.
I know I can just test for all things all of the time, but, I'd prefer a cleaner method.
thanks
detect that an application created a child window?
Moderators: Dorian (MJT support), JRL
-
- Junior Coder
- Posts: 35
- Joined: Thu Jan 12, 2006 9:20 pm
- Contact:
Related threads
Hi chihuahualand,
It looks like this problem can be solved using methods similar to those recommended in your more recent thread:
http://www.mjtnet.com/usergroup/viewtopic.php?t=5611
If you do a GetActiveWindow at the point where a child window is possible you will obtain information to distinguish it from the main window, even if they have the same title. The position or size may be different. If the title, position, and size are identical the handle will be certainly be different.
Another way to tell is to do a GetWindowList. The number of windows will increase and two windows will have the same name in your example.
Gale
It looks like this problem can be solved using methods similar to those recommended in your more recent thread:
http://www.mjtnet.com/usergroup/viewtopic.php?t=5611
If you do a GetActiveWindow at the point where a child window is possible you will obtain information to distinguish it from the main window, even if they have the same title. The position or size may be different. If the title, position, and size are identical the handle will be certainly be different.
Another way to tell is to do a GetWindowList. The number of windows will increase and two windows will have the same name in your example.
Gale