detect that an application created a child window?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
chihuahualand
Junior Coder
Posts: 35
Joined: Thu Jan 12, 2006 9:20 pm
Contact:

detect that an application created a child window?

Post by chihuahualand » Tue Jul 14, 2009 8:22 pm

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

gdyvig
Automation Wizard
Posts: 447
Joined: Fri Jun 27, 2008 7:57 pm
Location: Seattle, WA

Related threads

Post by gdyvig » Fri Jul 17, 2009 3:59 am

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

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts