Search the Community
Showing results for tags 'DWebBrowserEvents2'.
-
Hello! I need to use DebBroserEvents2 interface and Shell.Explorer.2 but my script produces a fatal error for NewWindow event Example: #include <GUIConstantsEx.au3> Global $oIE = ObjCreate("Shell.Explorer.2") Global $oIEEvent = ObjEvent($oIE, "_IEEvent_", "DWebBrowserEvents2") ;~ Global $oIEEvent = ObjEvent($oIE, "_IEEvent_", "DWebBrowserEvents") ; no error, but this interface is obsolete $Form1 = GUICreate("Form1", 625, 450, -1, -1) $Shell = GUICtrlCreateObj($oIE, 0, 0, 625, 450) $oIE.Navigate("about:blank") $oIE.document.body.innerHTML = '<a href="http://www.autoitscript.com" target="_blank">New window</a> (click by link)' GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _IEEvent_BeforeNavigate2($oIE, $sURL, $sFlags, $sTargetFrameName, $sPostData, $sHeaders) ConsoleWrite("+======================================================" & @CR & _ "-_IEEvent_BeforeNavigate2" & @CR & _ "-->$oIE:" & @TAB & $oIE & @CR & _ "-->$sURL:" & @TAB & $sURL & @CR & _ "-->$sFlags:" & @TAB & $sFlags & @CR & _ "-->$sTargetFrameName:" & @TAB & $sTargetFrameName & @CR & _ "-->$sPostData:" & @TAB & $sPostData & @CR & _ "-->$sHeaders:" & @TAB & $sHeaders & @CR & _ "+======================================================") EndFunc Func _IEEvent_NavigateComplete2($oIE, $sURL) ConsoleWrite("+======================================================" & @CR & _ "-_IEEvent_NavigateComplete2" & @CR & _ "-->$oIE:" & @TAB & $oIE & @CR & _ "-->$sURL:" & @TAB & $sURL & @CR & _ "+======================================================") EndFunc Thanks for any help!
- 1 reply
-
- DWebBrowserEvents2
- IE
-
(and 1 more)
Tagged with: