Jump to content

Recommended Posts

Posted (edited)

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

#AutoIt3Wrapper_UseX64=n

#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)
_IENavigate($oActiveX,"www.google.ro")
GUISetState(@SW_SHOW,$hMain)

While True
Switch GUIGetMsg()
Case $hBack
_IEAction($oActiveX,"back")
Case $hForward
_IEAction($oActiveX,"forward")
Case -3
$oActiveX = 0
Exit
EndSwitch
Sleep(10)
WEnd

;~ 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
Posted

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.2.1.0.8 Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 2 CPU:X64 OS:X64)

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

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

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

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

>Exit code: -1073741819 Time: 4.249

Posted

So its a IE crash not ur programms' crash. Then check your IE. Which ur using? I had once a same problem and i just debug the site to find it.

I feel nothing.It feels great.

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
×
×
  • Create New...