gpholman

Accessing Embedded IE

5 posts in this topic

Hi

 

I'm unable to interact with an IE OCX (ieframe.dll) embedded in a Window (3rd party, not AutoIT GUI) can someone please tell me what I'm doing wrong:

 

#include <ie.au3>

$win = wingethandle("test window")

$ocx = controlgethandle($win, "", "[CLASS: Internet Explorer_Server; INSTANCE:1]")

_IENavigate($ocx, "test.html")

 

$win and $ocx return the correct handles but that's as far as I can get - is $ocx the wrong handle to be using?

 

 

 

Share this post


Link to post
Share on other sites



_IEAttach()


if @error Then
	MsgBox(262192,"",@ComputerName&" slaps "&@UserName&" around a bit with a large trout!")
	EndIf

>Exit code: 0

REAL search results

"Yeah yeah yeah, patience. How long will that take?"  -Ed Gruberman

Share this post


Link to post
Share on other sites

Thanks, that looks to be just what I should be using bit I'm still not getting anywhere.

 

autoit window info tells me the object Class is 'Internet Explorer_Server' but whatever I try I get nothing back.  I think I should be using the 'embedded' option (the ocx is 'embedded' in the parent window, right?).

Share this post


Link to post
Share on other sites

there is an embedded option for ieattach


if @error Then
	MsgBox(262192,"",@ComputerName&" slaps "&@UserName&" around a bit with a large trout!")
	EndIf

>Exit code: 0

REAL search results

"Yeah yeah yeah, patience. How long will that take?"  -Ed Gruberman

Share this post


Link to post
Share on other sites

Great, thanks, thats what I needed.  This threw me for ages as it kept failing - finally tracked it down to the web page being called causes _IEAttach to fail on the line 'Return $oIE.Document.parentwindow'.  Other web pages work just fine.

 

Has anyone else experienced this?  I'm guessing the page is fannying about with the DOM in some fashion that screws things up??

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