Sign in to follow this  
Followers 0
Israel

Connect an active IE window

19 posts in this topic

Hello,

I'm creating a function that connects to an active IE window. From beginning it worked, but some applications are emerging that does not connect. Displays the error:
-> IE.au3 T3.0-1 Warning function from _IEAttach, $ _IESTATUS_NoMatch
Does anyone know how to help me?

Func _ConnectWindow()

    $oie = _IEAttach(WinGetHandle(""), "hwnd")
    If @error Then
        Return False
    Else
        Return $oie
    Endif    
    
endFunc

 

Share this post


Link to post
Share on other sites



is a window ie yes. This function is associated with a shortcut key.

Share this post


Link to post
Share on other sites

I start my tool after active ie a window and squeeze the button to connect it

 

Share this post


Link to post
Share on other sites

Not 100%, but I just wanted to understand why it works for some and not for others and these windows contains titles. It is necessary to connect in a open and active window ie, ie until access I I do not know the title of it

Share this post


Link to post
Share on other sites

unsuccessfully :(

Share this post


Link to post
Share on other sites

have a look to Example 5 in the help of the  _IEAttach() function.


small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites

JohnOne, I can not send you the application I'm trying to access is private because of my service, but with banking sites do not work either. Can there be any network lock?

Chimp, the correct instance does not help me because I can have more than one open window and have to plug in a specifies.

Share this post


Link to post
Share on other sites

already I tried in every way and I'm doing tests with bank site. I always back the error in the match

Share this post


Link to post
Share on other sites

I changed my function to the function below:

Local $a = WinGetHandle("[Active]")
ConsoleWrite($a & @CRLF)
    
$oie = _IEAttach(WinGetHandle("[Active]"), "hwnd")
If @error Then
    Return False
EndIf

Return True

And I did the tests at the following sites:

http://www.bb.com.br/portalbb/home29,116,116,1,1,1,1.bb
https://www.itau.com.br/
http://www.caixa.gov.br/Paginas/home-caixa.aspx

all sites above worked, but it did not work at the site below:

http://mercantildobrasil.com.br/BeneficiarioINSS/Paginas/default.aspx

I did the tests with banking sites to maintain a standard. They know why it works in some and not in others? The handle that returns is the same for all, which leaves the error without any sense.

Share this post


Link to post
Share on other sites

Once again, works fine here.

#include <IE.au3>

Sleep(3000) ; Time to activate window.

$oie = _IEAttach(WinGetHandle("[Active]"), "hwnd")
If @error Then
    Exit MsgBox(0,0,0)
EndIf

_IENavigate($oie, "https://www.google.co.uk/")

 


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

JohnOne,

My script has to connect to an active window and get the url that window. So I created this function. The example above works sent me on the websites of banks? because for me does not work here.

Share this post


Link to post
Share on other sites

JohnOne,

I did the tests here and there is a plugin that makes the lock on my machine. I apologize for the inconvenience and appreciate the dedication to help. Thank you.

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