Sign in to follow this  
Followers 0
Arclite86

how to focus on pop up IE window or switch between 2 windows

5 posts in this topic

#1 ·  Posted (edited)

I want to focus my script on a pop-up internet explore window, how can I manage this?

because when I want to continue the script I get this error:

--> IE.au3 T3.0-1 Warning from function _IEGetObjById, $_IEStatus_NoMatch (1nnbtn)
--> IE.au3 T3.0-1 Error from function _IEAction(click), $_IEStatus_InvalidDataType
--> IE.au3 T3.0-1 Warning from function _IEGetObjById, $_IEStatus_NoMatch (1nnbtn)
--> IE.au3 T3.0-1 Error from function _IEAction(click), $_IEStatus_InvalidDataType
--> IE.au3 T3.0-1 Warning from function _IEGetObjById, $_IEStatus_NoMatch (1nnbtn)
--> IE.au3 T3.0-1 Error from function _IEAction(click), $_IEStatus_InvalidDataType

I tried wingethandle but it gets the wrong one every time:

WinGetHandle("google - Internet Explorer")
_IENavigate($oIE, "http://www.autoitscript.com")

the title of the pop-up windows is : "(first random text)  | Google - explorer

but it gets the first  window everytime 

how can I focus it on the pop-up window

is there maybe a way to switch from window because there are only 2 windows and it is first focused on the first window  that i opens a second window

Edited by Arclite86

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Have you tired WinList or _WinAPI_EnumChildWindows?

Edit:

I should iterate.  There is probably two windows that match the title in WinList after the popup.  1 should match your $oIE.hwnd, the other should be your popup.  EnumChildWindows should be different.

You might even use: _WinAPI_EnumProcessWindows(WinGetProcess($oIE.hwnd))

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

_WinAPI_GetWindow with option 6 returns the enabled popup


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

_WinAPI_GetWindow with option 6 returns the enabled popup

 

could you give me an example of the function I cant find anything  for this i tried something like this

_WinAPI_GetWindow( "[Internet - Explorer]",6 )
Edited by Arclite86

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0