4月102018
AU3内嵌IE不在新窗口弹窗
```<code class="language-autoit hljs">#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ie.au3>
$oIE = ObjCreate("Shell.Explorer.1")
#QQ群:477266297
#AU3论坛:www.autoit3.cn
#Region ### START Koda GUI section ### Form=
$GUIMain = GUICreate("GUIMain", 800, 600, 0, 0)
GUICtrlCreateObj($oIE, 0, -0, 800, 600)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$EventObject = ObjEvent($oIE, "IEEvent_", "DWebBrowserEvents")
$URL = "http://www.qq.com/"
$oIE.Navigate($URL)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func IEEvent_NewWindow($ppDisp, $Cancel)
Local $o_Shell = ObjCreate("Shell.Application")
Local $o_ShellWindows = $o_Shell.Windows(); collection of all ShellWindows (IE and File Explorer)
For $i = $o_ShellWindows.Count - 1 To 0 Step -1
If $o_ShellWindows.item($i).LocationURL == $ppDisp Then
$o_ShellWindows.item($i).quit()
EndIf
Next
$oIE.Navigate($ppDisp)
EndFunc ;==>IEEvent_NewWindow
扫描二维码,在手机上阅读
发表评论
木有头像就木JJ啦!还木有头像吗?点这里申请属于你的个性Gravatar头像吧!