Sign in to follow this  
Followers 0
SlowCoder74

Can't get _IEAttach to return object?

3 posts in this topic

Not sure what's going on here.  I'm passing the hWnd of the previously created IE window to _IEAttach, but it doesn't seem to want to return the object so I can grab body text. IEAttach returns error 7 (no match).

My sample script:

#include <IE.au3>

$iIEHWnd = Run(@ProgramFilesDir & "\Internet Explorer\iexplore.exe")
sleep(5000) ;give time to finish loading page
$oIE = _IEAttach($iIEHWnd,"hwnd")
msgbox(0,"","Error:" & @error)
$sIEBody = _IEBodyReadText($oIE)
msgbox(0,"",$sIEBody)

Share this post


Link to post
Share on other sites



The Run fonctions returns the process ID, not a window handle.

Use _IECreate() instead.

You know ... I knew that.  Dang it.

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