Re: 'DWebBrowserEvents'

"valery_vi" <[email protected]>
Newsgroups gmane.comp.windows.autoit.user
Message-ID <[email protected]>
Petr,

You should define the sink of events BEFORE any actions with 
instance of COM object.

So,

$oIE.Visible=0
$oIE.RegisterAsDropTarget = 1
$oIE.RegisterAsBrowser = 1
$SinkObject=ObjEvent($oIE,"IEEvent_","DWebBrowserEvent2Sink");

must be replaced like this:

$SinkObject=ObjEvent($oIE,"IEEvent_","DWebBrowserEvent2Sink");
$oIE.Visible=0
$oIE.RegisterAsDropTarget = 1
$oIE.RegisterAsBrowser = 1

Valery

--- In [email protected], "Petr Dyntar" <pdyntar@...> wrote:
>
> Hi Autoit Guys,
> I was using script navigating on pages etc.
> I once got from you (its like year ago) this check for "obj event" 
etc.
> But i forgot solution for it,and cand find it out. So i have 
check,and iam getting this errorcode
> 'DWebBrowserEvents'. err code 80004002
> but i dont know what it means anymore and how to solve it:)
> Dont you know?
> thanks a lot,example is here..
> 
> $oIE=ObjCreate("InternetExplorer.Application.1");spusti IE
> if @error then
>   Msgbox(0,"","Error opening Internet Explorer: " & @error)
>   exit
> endif
> $oIE.Visible=0
> $oIE.RegisterAsDropTarget = 1
> $oIE.RegisterAsBrowser = 1
> $SinkObject=ObjEvent($oIE,"IEEvent_","DWebBrowserEvent2Sink");jsou 
2typy exploreru!
> if @error then 
>    Msgbox(0,"COM test","ObjEvent: Can't use 
interface 'DWebBrowserEvents'. error code: " & hex(@error,8))
>    endif
> if @error then 
>    Msgbox(0,"COM test Test","ObjEvent: Can't use 
interface 'DWebBrowserEvents'. error code: " & hex(@error,8))
> endif
> $oIE.ToolBar = 0
> $oIE.AddressBar= 0
> $oIE.Left = 20
> $oIE.Height = 350
> $oIE.width = 150
> $oIE.Navigate ("c:\erma_data\Start.htm");naviguje (pro napovedu)
> $oIE.Visible=1
> 
> 
> 
> Petr Dyntar
> RMA Coordinator
> Test Engineering
> Foxconn CZ,Cisco
> +42046 605 7205
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.