找回密码
 加入
搜索
查看: 2284|回复: 3

[IE类操作] 如何禁止网页弹出对话框?

  [复制链接]
发表于 2011-1-26 17:42:14 | 显示全部楼层 |阅读模式
#include<IE.au3>


_IEPropertySet($oIE,"silent",1)

以及_IEPropertySet($oIE,"silent",Ture)

网页照样弹出对话框来,不知如何解决?

另外,如果把IE嵌入GUI中,又怎么禁止弹出对话框呢?
发表于 2011-1-26 18:57:51 | 显示全部楼层
$IEWnd=HWnd($oIE.hWnd)
Func IEEvent_NewWindow($ppDisp, $Cancel)
        
        $oIE.Navigate($ppDisp)
        
        Sleep(1000)
               
        Local $ihwnd = WinGetHandle(WinGetTitle("",""),"")
               
        If $ihwnd<>HWnd($ieWND) Then
                ;WinActivate(HWnd($ieWND), "")
                Local $o_Pos = WinGetPos(HWnd($ieWND),"")
                WinMove($ihwnd, "", $o_Pos[0], $o_Pos[1], $o_Pos[2], $o_Pos[3], 5)
                ;WinSetState($ihwnd,"",@SW_MINIMIZE)
                WinActivate(HWnd($ieWND), "")
                WinClose($ihwnd,"")
        EndIf
               
        ;$Cancel = True
        
EndFunc   ;==>IEEvent_NewWindow
发表于 2011-1-26 23:07:14 | 显示全部楼层
$oIE.Silent = 1
 楼主| 发表于 2011-1-27 21:56:46 | 显示全部楼层
谢谢各位!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-6-9 00:15 , Processed in 0.094170 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表