CreeTar Posted August 18, 2013 Posted August 18, 2013 Hey there, when I open the example au3 from _IECreateEmbedded and try to run it, it results in APPCRASH of autoit3.exe. Same happens also in an example script from myself: Opt("GUIOnEventMode", 1) Local $objIE = _IECreateEmbedded() Local $hwnd = GUICreate("Loading...", 500, 200, 10, 10) GUICtrlCreateObj($objIE, 10, 10, 400, 100) _IEBodyWriteHTML($objIE, "<b>rabbit</b>") GUISetOnEvent($GUI_EVENT_CLOSE, "ExitProgram") GUISetState(@SW_SHOW) While 1 WEnd Func ExitProgram() Exit EndFunc If i uncomment _IEBodyWriteHTML it is loading the application, if not it will crash. Any hints? Using AutoIt3Wrapper v.2.1.2.9 on 3.3.9.5, AutoIt3.exe ended.rc:-1073741819
mikell Posted August 18, 2013 Posted August 18, 2013 (edited) Hmm the helpfile says "You must therefore use _IENavigate to navigate this browser to 'about:blank' after it has been embedded into the parent application and before you attempt any operations that rely on having a document loaded (e.g. _IEBodyWriteHTML)." So something like this should work #include <IE.au3> #include <GUIConstantsEx.au3> Opt("GUIOnEventMode", 1) $file = FileWrite("C:\test.htm", "<b>rabbit</b>") Local $objIE = _IECreateEmbedded() Local $hwnd = GUICreate("Loading...", 500, 200, 10, 10) GUICtrlCreateObj($objIE, 10, 10, 400, 100) GUISetOnEvent($GUI_EVENT_CLOSE, "ExitProgram") GUISetState(@SW_SHOW) Sleep(1000) _IEDocWriteHTML($objIE, "<b>cat</b>") _IEAction($objIE, "refresh") While 1 WEnd Func ExitProgram() Exit EndFunc Edited August 18, 2013 by mikell
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