superflq 发表于 2011-10-11 12:36:32

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

本帖最后由 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("")
Global $oIE, $Form
Global $Web = "http://www.99uc.net/"
Global $title = "浏览器"

_IEErrorHandlerRegister()
$oIE = _IECreateEmbedded()
_IEAction($oIE, "stop")
$Form = GUICreate($title, @DesktopWidth, @DesktopHeight - $Rect, 0, 0, $WS_POPUP)
$GUIActiveX = GUICtrlCreateObj($oIE, 2, 2, @DesktopWidth - 2, @DesktopHeight - $Rect - 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)
                DllCall("kernel32.dll", "int", "CloseHandle", "int", $ai_Handle)
        Else
                Local $ai_Return = DllCall("psapi.dll", "int", "EmptyWorkingSet", "long", -1)
        EndIf
        Return $ai_Return
EndFunc   ;==>_ReduceMemory

superflq 发表于 2011-10-11 12:38:49

自己顶下,只要去掉上面大篇幅的广告就行,不需要把细小的广告去掉

superflq 发表于 2011-10-11 13:41:02

大大们~~~~~~

superflq 发表于 2011-10-11 17:23:14

还是没有神人出现么

happytc 发表于 2011-10-11 18:51:15

还是没有神人出现么
superflq 发表于 2011-10-11 17:23 http://www.autoitx.com/images/common/back.gif


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

superflq 发表于 2011-10-11 19:07:00

怀着无比崇敬心情进来学习:如何用Autoit做浏览器的
结果……
我不是神人
happytc 发表于 2011-10-11 18:51 http://www.autoitx.com/images/common/back.gif


   可以分享下么,怎么去那么多广告的~

lynfr8 发表于 2011-10-11 19:17:29

分析广告的链接,添加到hosts试试

superflq 发表于 2011-10-11 20:06:14

分析广告的链接,添加到hosts试试
lynfr8 发表于 2011-10-11 19:17 http://www.autoitx.com/images/common/back.gif

我看下了IE的相关函数感觉可以用_IEBodyWriteHTML解决
不知道怎么用

autt 发表于 2011-10-12 19:47:40

用正则看看

redapple2008 发表于 2011-10-12 21:45:22

不错 支持下 呵呵

xyhqqaa 发表于 2011-10-12 22:12:23

= =..什么浏览器。离不开IE内核的东西那。。。。。。。   运行代码。。白茫茫的一遍没东西,,,新手路过。,。。。。

superflq 发表于 2011-10-13 04:20:54

期待高手出现,~~

huangmin1111 发表于 2011-10-13 04:25:57

等待中。。。。

huangmin1111 发表于 2011-10-13 04:25:59

等待中。。。。

superflq 发表于 2011-10-14 05:06:49

继续顶~~~~~~
页: [1] 2
查看完整版本: 准备用AutoIT做个浏览器,可是去广告问题没办法解决,求帮助