找回密码
 加入
搜索
查看: 10060|回复: 28

[IE类操作] 准备用AutoIT做个浏览器,可是去广告问题没办法解决,求帮助

 火.. [复制链接]
发表于 2011-10-11 12:36:32 | 显示全部楼层 |阅读模式
本帖最后由 superflq 于 2011-10-11 17:23 编辑

如下面我用AutoIT内嵌了一个IE,可是这个http://www.99uc.net/上面有大篇幅广告
不知道怎么才能去掉,有高手指点下么,
#NoTrayIcon
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <ButtonConstants.au3>
#include <WindowsConstants.au3>
#include <GuiStatusBar.au3>
#include <GuiConstantsEx.au3>
#include <EditConstants.au3>
#include <IE.au3>
#include <Misc.au3>


HotKeySet("{Esc}", "OUT")

Global $Rect = WinGetPos("[CLASS:Shell_TrayWnd]")
Global $oIE, $Form
Global $Web = "http://www.99uc.net/"
Global $title = "浏览器"

_IEErrorHandlerRegister()
$oIE = _IECreateEmbedded()
_IEAction($oIE, "stop")
$Form = GUICreate($title, @DesktopWidth, @DesktopHeight - $Rect[3], 0, 0, $WS_POPUP)
$GUIActiveX = GUICtrlCreateObj($oIE, 2, 2, @DesktopWidth - 2, @DesktopHeight - $Rect[3] - 5)
_IENavigate($oIE, $Web, 0)
GUISetState(@SW_SHOW, $Form)


While 1
        _ReduceMemory(@AutoItPID)
        Sleep(3600000)
WEnd

Func OUT()
        Exit
EndFunc   ;==>OUT

Func _ReduceMemory($i_PID = -1)
        If $i_PID <> -1 Then
                Local $ai_Handle = DllCall("kernel32.dll", "int", "OpenProcess", "int", 0x1f0fff, "int", False, "int", $i_PID)
                Local $ai_Return = DllCall("psapi.dll", "int", "EmptyWorkingSet", "long", $ai_Handle[0])
                DllCall("kernel32.dll", "int", "CloseHandle", "int", $ai_Handle[0])
        Else
                Local $ai_Return = DllCall("psapi.dll", "int", "EmptyWorkingSet", "long", -1)
        EndIf
        Return $ai_Return[0]
EndFunc   ;==>_ReduceMemory
 楼主| 发表于 2011-10-11 12:38:49 | 显示全部楼层
自己顶下,只要去掉上面大篇幅的广告就行,不需要把细小的广告去掉
 楼主| 发表于 2011-10-11 13:41:02 | 显示全部楼层
大大们~~~~~~
 楼主| 发表于 2011-10-11 17:23:14 | 显示全部楼层
还是没有神人出现么
发表于 2011-10-11 18:51:15 | 显示全部楼层
还是没有神人出现么
superflq 发表于 2011-10-11 17:23



   怀着无比崇敬心情进来学习:如何用Autoit做浏览器的
结果……
我不是神人

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×

评分

参与人数 1金钱 +10 收起 理由
superflq + 10 大大分享下

查看全部评分

 楼主| 发表于 2011-10-11 19:07:00 | 显示全部楼层
怀着无比崇敬心情进来学习:如何用Autoit做浏览器的
结果……
我不是神人
happytc 发表于 2011-10-11 18:51



   可以分享下么,怎么去那么多广告的~
发表于 2011-10-11 19:17:29 | 显示全部楼层
分析广告的链接,添加到hosts试试
 楼主| 发表于 2011-10-11 20:06:14 | 显示全部楼层
分析广告的链接,添加到hosts试试
lynfr8 发表于 2011-10-11 19:17


我看下了IE的相关函数感觉可以用_IEBodyWriteHTML解决
不知道怎么用
发表于 2011-10-12 19:47:40 | 显示全部楼层
用正则看看
发表于 2011-10-12 21:45:22 | 显示全部楼层
不错 支持下 呵呵
发表于 2011-10-12 22:12:23 | 显示全部楼层
= =..什么浏览器。离不开IE内核的东西那。。。。。。。   运行代码。。白茫茫的一遍没东西,,,新手路过。,。。。。
 楼主| 发表于 2011-10-13 04:20:54 | 显示全部楼层
期待高手出现,~~
发表于 2011-10-13 04:25:57 | 显示全部楼层
等待中。。。。
发表于 2011-10-13 04:25:59 | 显示全部楼层
等待中。。。。
 楼主| 发表于 2011-10-14 05:06:49 | 显示全部楼层
继续顶~~~~~~
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-17 07:51 , Processed in 0.091086 second(s), 28 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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