Sign in to follow this  
Followers 0
VixinG

_IEAttach() and Internet Explorer 10 'IEStatus_NoMatch'

5 posts in this topic

Hey guys  :rolleyes:

I tried to attach to currently running Internet Explorer process, but without success.
I even looped it, just like DaleHohm said

$hWnd = WinGetHandle("Google - Windows Internet Explorer")
Do
Local $oIE = _IEAttach($hWnd, "HWND")
Sleep(500)
Until IsObj($oIE)
MsgBox(0, "IE URL", _IEPropertyGet($oIE, "locationurl"))

Sadly, it can't attach. I'm getting error:

--> IE.au3 V2.4-0 Warning from function _IEAttach, $_IEStatus_NoMatch

I was working on IE 9 before and couldn't attach, so I installed IE 10, hoping it will resolve this issue, but nope...

Have you got any ideas?

Would greatly appreciate any help!


[indent=3][/indent]

Share this post


Link to post
Share on other sites



What does $hWnd contain after the WinGetHandle? Do you check to see if it got a valid window handle before calling the _IEAttach function with it? Have you tried the AutoItOptions for matching a window title when using WinGetHandle?


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

What does $hWnd contain after the WinGetHandle? Do you check to see if it got a valid window handle before calling the _IEAttach function with it? Have you tried the AutoItOptions for matching a window title when using WinGetHandle?

Yes, I'm always using it for longer names like this.

#include <IE.au3>

$hWnd = WinGetHandle("[Class:IEFrame]")
ConsoleWrite(WinGetTitle($hWnd) & @CRLF) ; shows exact name
Do
Local $oIE = _IEAttach($hWnd, "HWND")
Sleep(500)
Until IsObj($oIE)
MsgBox(0, "IE URL", _IEPropertyGet($oIE, "locationurl"))

Still the same error.


[indent=3][/indent]

Share this post


Link to post
Share on other sites

I don't understand why you are using the Do...Until loop, but no matter...

Is there anything unique about this browser instance you are attempting to attach to?  How was it created?  In what context is it displayed (embedded, full browser instance, etc.)?  Might you be trying to attach to a browser placed into an elevated security zone?

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I saw a topic where someone had similar problem (couldn't _IEAttach() ) and you told him to try loop it until it successfully attach.

It's manually opened IE process from "C:\Program Files (x86)\Internet Explorer\iexplore.exe". It's not maximized.

Edit:

I uninstalled IE10 and went back to IE9. Everything works now. I can attach without errors.
Sorry to bother you.

Edited by VixinG

[indent=3][/indent]

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

  • Similar Content

    • chachew
      By chachew
      Is there an equivalent function to attach to a specific chrome tab?
      Similar to the IEAttach in e IE UDF
    • kalel69
      By kalel69
      I asked this question in another post, but everyone ignored it, so I will ask it here in a new post... sorry for the redundency...

      I have a web page that is slow to load at times, and I work in frames.
      I've tried _LoadWait, but it returns before all the frames load, and the objects don't get created because it can't find the paths to the objects within the frames. If I put just sleep commands in it works but takes too long. I'd like it to return to the user after the page loads 100 % completely and my commands don't fail.

      I've been doing it by checking isobj()


      $Count = 0 Do $Count+=1 $oIE = _IEAttachHDL($DQMwHndl) Sleep(200) If $Count > 10 Then MsgBox(0,$DQMerror1,$DQMerror2) Return EndIf Until IsObj($oIE)
      This works, but takes up CPU time checking a lot until the page loads. ($DQMwHndl is the handle to the IECREATE(web address) - _IEAttachHDL is a shorned version only using HWND's)
      After the attach, I have to check for the frame, and form, using the same logic, or sometimes my script fails, as it cant get past all that stuff.

      The short version:

      $oIE = _IEAttachHDL($DQMwHndl) $oIFrame = _IEFrameGetObjByName($oIE, "ifmPage") $oForm = _IEFormGetObjByName($oIFrame, "frmADT") $oSubmit = _IEGetObjByName($oForm, "button2") $oSearchCompID = _IEFormElementGetObjByName($oForm, $CompanyPicker) _IEFormElementSetValue($oSearchCompID,$ClientFacility) _IEAction($oSubmit, "click") the long version is what works, with each line above having a loop to check IsObj(). Basically because _loadwait() really doesn't work well. So each time I click a link, i have to verify all the objects again.

      Func _ADTDefs() If WinExists($DQMwHndl) Then $oIE = _IEAttachHDL($DQMwHndl) _IELinkClickByIndex ($oIE, $ClickADTDefSearch);link 43 search ADT defs. Sleep(200) $Count = 0 Do $Count+=1 $oIE = _IEAttachHDL($DQMwHndl) Sleep(200) If $Count > 10 Then MsgBox(0,$DQMerror1,$DQMerror2) Return EndIf Until IsObj($oIE) Sleep(200) $Count = 0 Do $Count+=1 $oIFrame = _IEFrameGetObjByName($oIE, "ifmPage") Sleep(200) If $Count > 10 Then MsgBox(0,$DQMerror1,$DQMerror2) Return EndIf Until IsObj($oIFrame) Sleep(200) $Count = 0 Do $Count+=1 $oForm = _IEFormGetObjByName($oIFrame, "frmADT") Sleep(200) If $Count > 10 Then MsgBox(0,$DQMerror1,$DQMerror2) Return EndIf Until IsObj($oForm) Sleep(200) $Count = 0 Do $Count+=1 $oSubmit = _IEGetObjByName($oForm, "button2") Sleep(200) If $Count > 10 Then MsgBox(0,$DQMerror1,$DQMerror2) Return EndIf Until IsObj($oSubmit) Sleep(300) $Count = 0 Do $Count+=1 $oSearchCompID = _IEFormElementGetObjByName($oForm, $CompanyPicker);this is the call that is failing... if @error then $Temp = 0;nothing Sleep(400) If $Count > 10 Then MsgBox(0,$DQMerror1,$DQMerror2) Return EndIf Until IsObj($oSearchCompID) Sleep(400) _IEFormElementSetValue($oSearchCompID,$ClientFacility) Sleep(500) _IEAction($oSubmit, "click") EndIf EndFunc Is there a better way to make sure each object is a valid object other than what I preset here (too lengthy-not a clean script, too much CPU time) or a better way to ensure the page is really loaded instead of relying on LoadWait that will allow the short version to run properly?

      Thanks in Advance!