本帖最后由 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
|