Michel Claveau Posted January 20, 2007 Posted January 20, 2007 (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 January 20, 2007 by Michel Claveau
jvanegmond Posted January 20, 2007 Posted January 20, 2007 (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 January 20, 2007 by Manadar github.com/jvanegmond
Michel Claveau Posted January 20, 2007 Author Posted January 20, 2007 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 _IECreateIt's an idea, unfortunately the ActiveX object must interact with the page (exchange of objects)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now