Sign in to follow this  
Followers 0
cmnetworx

Execute js within internet explorer

2 posts in this topic

I am having a bit of a hard time wrapping my head around this one..

I am trying to execute javascript out of an already loaded page..

#include <IE.au3>
$oIE = _IEAttach ("http://localhost/list.php - Microsoft Internet Explorer")
$oIEDoc = _IEDocGetObj($oIE)
$oIEDoc.parentwindow.setTimeout('show_alert()', 0)

However this does not work, The error I am getting is Variable must be of type "Object"

What am I missing here..?

Is this failing to attach to the window? or can this not be done, and a new window must be loaded?

Any help would be appreciated, thanks.

Share this post


Link to post
Share on other sites



Ok, So I got this to work when I changed it to

#include <IE.au3>
$v = _IEAttach ("AutoIt")
$v.document.parentwindow.execscript("alert('Hello')")

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