Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
JRL
- Automation Wizard
- Posts: 3532
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Thu Oct 26, 2006 6:06 pm
Is there any way to perform WaitWindowOpen for the Internet Explorer web browser and only detect the web browser? This short script will demonstrate my problem. I want to detect that the Internet Explorer web browser has opened but Microsoft has tied "Internet Explorer" to other windows. Two that I discovered right away are Windows Explorer and "Run" from the Start menu. Even though GetActiveWindow does not report "Internet Explorer" in the names of these two windows, apparently opening them opens another window that contains "Internet Explorer".
Here is a script that will allow you to see what I mean. Run this then open Windows explorer or goto Start > Run and see what happens.
Code: Select all
Label>start
WaitWindowOpen>Internet Explorer*
Wait>0.3
GetActiveWindow>WindowName,X,Y,W,H
MDL>%WindowName% %X% %Y% %W% %H%
Ask>Do again?,askresult
If>askresult=YES,start
Wait>0.3
Thanks for any help,
Dick
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Thu Oct 26, 2006 6:30 pm
Using Tools/View System Windows I find there are _lots_ of hidden windows with "internet explorer" in the title. So, some things you can do:
1. Use WF_TYPE=2 first
2. look for "Microsoft Internet Explorer" instead of just "internet explorer"
3. Internet Explorer has class name "IEFrame". So you could wait for a window with that classname:
Code: Select all
Let>ieHwnd=0
Repeat>ieHwnd
LibFunc>User32,FindWindowA,ieHwnd,IEFrame,0
Wait>0.2
Until>ieHwnd>0
MessageModal>Found an IEFrame Window
-
JRL
- Automation Wizard
- Posts: 3532
- Joined: Mon Jan 10, 2005 6:22 pm
- Location: Iowa
Post
by JRL » Thu Oct 26, 2006 6:39 pm
Thanks Marcus.
1. Use WF_TYPE=2 first
2. look for "Microsoft Internet Explorer" instead of just "internet explorer"
Seems to do the trick. I've yet to try the class name but will if this proves to be inadequate.
Dick