說到底還要用Object
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
GUICreate("Demo", 353, 169, -1, -1, BitOR($WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_BORDER,$WS_CLIPSIBLINGS))
$Button1 = GUICtrlCreateButton("点击下载迅雷5", 96, 64, 161, 41, BitOR($BS_DEFPUSHBUTTON,$WS_GROUP))
$oIE = ObjCreate("Shell.Explorer.2")
If Not IsObj($oIE) Then
MsgBox(16, "Demo", "Object 创建失败.")
Exit
EndIf
GUICtrlCreateObj($oIE, 0, 0, 0, 0)
GUICtrlSetState(-1, $GUI_HIDE)
GUISetState(@SW_SHOW)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$oIE.navigate("http://down.sandai.net/Thunder5.9/Thunder5.9.1.922.exe")
EndSwitch
WEnd
|