准备用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 17:23 http://www.autoitx.com/images/common/back.gif
怀着无比崇敬心情进来学习:如何用Autoit做浏览器的
结果……
我不是神人 怀着无比崇敬心情进来学习:如何用Autoit做浏览器的
结果……
我不是神人
happytc 发表于 2011-10-11 18:51 http://www.autoitx.com/images/common/back.gif
可以分享下么,怎么去那么多广告的~ 分析广告的链接,添加到hosts试试 分析广告的链接,添加到hosts试试
lynfr8 发表于 2011-10-11 19:17 http://www.autoitx.com/images/common/back.gif
我看下了IE的相关函数感觉可以用_IEBodyWriteHTML解决
不知道怎么用 用正则看看 不错 支持下 呵呵 = =..什么浏览器。离不开IE内核的东西那。。。。。。。 运行代码。。白茫茫的一遍没东西,,,新手路过。,。。。。 期待高手出现,~~ 等待中。。。。 等待中。。。。 继续顶~~~~~~
页:
[1]
2