Jump to content

IE Embedded crash on typing

Recommended Posts

Have an idea anyone why is crashing this script when I try to type some letter on google using an IE embedded object?


#include <IE.au3>

Global $oActiveX, $oSink, $hMain, $hURL

$oActiveX = _IECreateEmbedded()
;~ $oSink = ObjEvent($oActiveX,"IEEvent_","DWebBrowserEvents2")

$hMain = GUICreate("Example",800,600)
$hActiveX = GUICtrlCreateObj($oActiveX,5,5,790,555)
$hBack = GUICtrlCreateButton("Back",5,565,100,30)
$hForward = GUICtrlCreateButton("Next",110,565,100,30)
$hURL = GUICtrlCreateLabel("",215,565,580,30,0x1000)

While True
Switch GUIGetMsg()
Case $hBack
Case $hForward
Case -3
$oActiveX = 0

;~ Func IEEvent_DocumentComplete($pDisp,$URL)
;~   GUICtrlSetData($hURL,_IEPropertyGet($oActiveX,'locationurl'))
;~ EndFunc

For some reason just in some case is this behavior, in others it works fine. ;)

Edited by Andreik
When the words fail... music speaks
Link to post
Share on other sites

Try to type something in google input, maybe not from the first but after some tries will crash. By the way _IEErrorHandlerRegister() handle COM errors but in this case is a crash so won't catch anything.

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:Documents and SettingsAdministratorDesktopEx.au3" /autoit3dir "C:Program Files (x86)AutoIt3" /UserParams

+>04:53:56 Starting AutoIt3Wrapper v. Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 2 CPU:X64 OS:X64)

>Running AU3Check ( from:C:Program Files (x86)AutoIt3

+>04:53:56 AU3Check ended.rc:0

>Running:( Files (x86)AutoIt3autoit3.exe "C:Documents and SettingsAdministratorDesktopEx.au3"

!>04:54:00 AutoIT3.exe ended.rc:-1073741819

>Exit code: -1073741819 Time: 4.249

When the words fail... music speaks
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...