如何在AU3窗口口内显示网页内容!!
如何在AU3窗口口内显示网页内容!!比如说 在窗口显示这个网页
http://www.930t.com/n930/n930.asp
:face (32): :face (32): :face (32): 自己看_IE...()的函数帮助文档中的例子吧
看完你不会 那我就不能说什么了 看下这个函数的实例
GUICtrlCreateObj 看帮助_IECreateEmbedded 搜索下,论坛有例子了。善于搜索你会发现很多. ; *******************************************************
; 例子 1 - 捕获COM错误,以便当"后退"和"前进"的超出历史记录的时候,能够返回而不退出代码.(希望COM错误被发送到控制台)
; *******************************************************
;
#include <GUIConstants.au3>
#include <IE.au3>
_IEErrorHandlerRegister ()
$oIE = _IECreateEmbedded ()
GUICreate("Embedded Web control Test", 640, 580, _
(@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
$WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
$GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360)
$GUI_Button_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30)
$GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30)
$GUI_Button_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30)
$GUI_Button_Stop = GUICtrlCreateButton("Stop", 340, 420, 100, 30)
GUISetState() ;Show GUI
_IENavigate ($oIE, "http://www.autoitscript.com")
; Waiting for user to close the window
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $GUI_Button_Home
_IENavigate ($oIE, "http://www.autoitscript.com")
Case $msg = $GUI_Button_Back
_IEAction ($oIE, "back")
Case $msg = $GUI_Button_Forward
_IEAction ($oIE, "forward")
Case $msg = $GUI_Button_Stop
_IEAction ($oIE, "stop")
EndSelect
WEnd
GUIDelete()
Exit 不知道有沒有簡單的只保留有畫面的頁面大小的方法? _IECreateEmbedded
--------------------------------------------------------------------------------
Create a Webbrowser object suitable for embedding in an AutoIt GUI with GuiCtrlCreateObj().
#include <IE.au3>
_IECreateEmbedded ( )
参数
None.
返回值
Success: Returns a Webbrowser object reference
Failure: Returns 0 and sets @ERROR
@Error: 0 ($_IEStatus_Success) = No Error
1 ($_IEStatus_GeneralError) = General Error
注意
No actions can be performed on this object until it has been embedded into a parent application (e.g. you cannot perform an _IENavigate). Because of this restriction, the browser is not automatically navigated to 'about:blank' as is a browser created with _IECreate. You must therefore use _IENavigate to navigate this browser to 'about:blank' after it has been embedded into the parent application and before you attempt any operations that rely on having a document loaded (e.g. _IEBodyWriteHTML).
There are several properties related to an InternetExplorer object (e.g. returned by _IECreate) that do not apply to this object. These include status text, addressbar and others that may exist for a browser, but do not exist for an embedded control.
You may have object visibility issues unless you use the Windows style $WS_CLIPCHILDREN in GUICreate().
_IEQuit cannot be used with this object. The object will be destroyed when its parent GUI is destroyed. 帮助文件对学习AU3很重要啊 :face (27):学习一下 这个好像帮助文档里面有例子啊
页:
[1]