试了几个小时,的确是有问题,3.37.15.1版本里 ,
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
Opt('MustDeclareVars', 1)
Example()
Func Example()
Local $oIE, $GUIActiveX, $GUI_Button_Back, $GUI_Button_Forward
Local $GUI_Button_Home, $GUI_Button_Stop, $msg
$oIE = _IECreateEmbedded()
; 创建一个简单的输出 GUI
GUICreate("嵌入 Web 控件测试", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
$GUIActiveX = 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
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $GUI_Button_Home
_IENavigate($oIE,"http://passport.17173.com/register")
MsgBox(64,"","sddsfds")
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
以上代码在3.3.7.15.1版本里要等超时才会弹出对话框。。。3.3.6.1的不会。 |