CliftonL

IECreate() and running function

12 posts in this topic

Hi all,

I've built a web application which needs to save information to a local database file. I am using AutoIT as a bridge between the web application and the database via various JavaScript functions that I have included in the page(s).

Problem:

If I use _IECreateEmbedded(), I can access my functions and retrieve data this way and it works perfect:

$oIE = _IECreateEmbedded( ... )

$data = $oIE.document.parentWindow.someFunction( params )

 

However, if I use _IECreate(), the functions always fail and I cannot figure out why:

$oIE = _IECreate( ... )

$data = $oIE.document.parentWindow.someFunction( params )

    (above line fails with this error message)

post-85741-0-37207900-1423367469_thumb.j

$data = $oIE.document.title

    (this line returns the title just fine)

Any ideas why I cannot get my functions to execute?

Share this post


Link to post
Share on other sites



Your "embedded" browser and your actual browser are two different types of browsers (even different versions).

My guess, because the information you've provided allows for nothing less, is that your functions have something that has been deprecated in your "actual" browser with current version (_IECreate()).

No idea what the heck line 9380 could be, and can only assume that JQTechStart.exe is the app you've created.  There is a space in your path btw, maybe that's causing issues.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

The functions perform in both environments, it is just that AutoIt cannot run any function in a window created with _IECreate(). I cannot even run a simple:

$oIE.document.parentWindow.alert('hello world')

I get the same error. The line number is because I'm used a compiled script with several dependencies.

Anyway, if other ideas come to mind I would very much appreciate it.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

IE11?  IE Update version what?

$oIE.document.parentWindow.eval("alert('hello wolrd')") work?

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

$oIE.document.parentWindow.evel("alert('hello world')") ... does not work either; in fact, I had already tried that too.

I think what is happening is IE 11 is blocking function execution in this context. But when the browser control is embedded in a GUI, it allows the call to pass.

I've even tried turning on/off protected mode to see if it would make any difference, but it didn't.

I revised my approach to use a timer and cookies to pass data back and forth and that seems to be working for now, but that is not the approach I was hoping for.

Edited by CliftonL

Share this post


Link to post
Share on other sites

If you look around the forum for posts on issues with IE11 for the past 2 months.  The consistent thing you'll find is that Microsoft broke some of their interpretation code in a December 18th update.  This is internet wide.  The solution for most has been to remove the update.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

#include <IE.au3>

$oIE = _IECreate("https://www.google.com")

$oIE.document.parentWindow.alert('hello world')

Win 7

AutoIt3 3.3.12.0

IE 11

Works fine here.

EDIT: I have not installed "Update for Internet Explorer 11 for Windows 7 (KB3025390)"

Edited by JohnOne

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

The alert does not show up in the browser when I run that code.

What does KB3025390 do? I have it installed on my Windows 7 box.

Share this post


Link to post
Share on other sites

Well I sure thank all of you for your assistance.

As of the patch Tuesday for Feb 10, 2015, this issue has been fixed. I was going to try and uninstall KB3025390 and thought I would try a windows update to see if MS had fixed problems created by that update. And sure enough, the problem that I've complained about in this thread has been fixed by today's patches.

I consider this matter closed ... so it would seem.

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