#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Example()
; 简单示例: 嵌入Internet Explorer对象到 AutoIt GUI
;
; 参见: http://msdn.microsoft.com/workshop/browser/webbrowser/reference/objects/internetexplorer.asp
Func Example()
Local $oIE, $GUI_Button_Back, $GUI_Button_Forward
Local $GUI_Button_Home, $GUI_Button_Stop, $msg
$oIE = ObjCreate("Shell.Explorer.2")
; 为输出创建一个简单的 GUI
GUICreate("嵌入 Web 控件测试", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
GUICtrlCreateObj($oIE, 10, 40, 600, 360)
$GUI_Button_Back = GUICtrlCreateButton("返回", 10, 420, 100, 30)
$GUI_Button_Forward = GUICtrlCreateButton("向前", 120, 420, 100, 30)
$GUI_Button_Home = GUICtrlCreateButton("主页", 230, 420, 100, 30)
$GUI_Button_Stop = GUICtrlCreateButton("停止", 330, 420, 100, 30)
GUISetState() ;显示 GUI
$oIE.navigate("http://www.autoitx.com")
Sleep(100)
While $oIE.readystate<>4
Sleep(100)
WEnd
$oIE.document.parentwindow.execscript("javascript:window.scrollTo(0,document.body.scrollHeight);")
; 等待用户关闭窗口
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $GUI_Button_Home
$oIE.navigate("http://www.autoitx.com")
Case $msg = $GUI_Button_Back
$oIE.GoBack
Case $msg = $GUI_Button_Forward
$oIE.GoForward
Case $msg = $GUI_Button_Stop
$oIE.Stop
EndSelect
WEnd
GUIDelete()
EndFunc ;==>Example
滚动到最后试一下这个,估计要再加个判断才能实现你说的不断增加不断滚动 |