Sign in to follow this  
Followers 0
Michel Claveau

Problem with _IECreateEmbedded

3 posts in this topic

#1 ·  Posted (edited)

Hi!

This script:

#include <IE.au3>
_IEErrorHandlerRegister()
$IE=_IECreate("about:blank")
$IE.navigate("file:///C:/ap0.htm")

Run OK.

But this script:

#include <IE.au3>
_IEErrorHandlerRegister()
$IE=_IECreateEmbedded()
$Form1=GUICreate("test-browser", 820, 640, 40, 20)
$bof=GUICtrlCreateObj($IE, 1, 1, 810, 630)

$IE.navigate("file:///C:/ap0.htm")

GUISetState()
While GUIGetMsg()<>-3
    Sleep(25)
WEnd

Don't run.

For ref, the ap0.htm:

<HTML><BODY>
AAAAAAAAAAAA<br>
BBBBBBBBBBBBBB<br>
<script language=Javascript>
ponx=new ActiveXObject('Ponx.Mci');
alert(ponx.PVersion());
</SCRIPT>
</BODY></HTML>

Précisions:

with "Create", the (java)-script is launch

with "CreateEmbedded", the (java)-script is not launched. But the HTML's part is display (in all cases).

I had try to embbed the activeX "Shell.Explorer.2" in another application (Paradox), and, with use of Navigate2("file:///C:/ap0.htm"), it's OK. Consequently, it's not a problem componant (assumption), because it run OK in another place.

Any idea?

Thank by advance

Edited by Michel Claveau

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I'm not sure what this is for. But if you don't need the Javascript to display the webpage, then display the webpage embedded and put the Javascript in a hidden IE window with _IECreate

Edited by Manadar

Share this post


Link to post
Share on other sites

Hi!

Thank for your answer.

Sorry, I'm bad in english ; consequently, my explanations was ambiguous.

In reality, the javascript run, in all cases. It's only the "new ActiveXObject" who block (the javascript execution).

If I set two "alert" before, and after, this part of code, with _IECreate, I have 2 alerts, with _IECreateEmbedded, I have only 1 alert.

put the Javascript in a hidden IE window with _IECreate

It's an idea, unfortunately the ActiveX object must interact with the page (exchange of objects)

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