Jump to content

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


Recommended Posts

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
Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

_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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...