|
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
$Form1 = GUICreate("邮箱登录器",700,480)
$Input1 = GUICtrlCreateInput("Input1", 184, 88, 161, 21)
$Input2 = GUICtrlCreateInput("Input2", 200, 108, 161, 21)
$Button1 = GUICtrlCreateButton("登陆", 208, 160, 105, 33)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$oIE = _IECreateEmbedded ()
$GUIActiveX = GUICtrlCreateObj($oIE,16, 24, 668, 374)
$oIE.navigate("http://mail.163.com")
$oform = _IEGetObjById ($oIE, "login163")
$oQuery1 = _IEFormElementGetObjByName ($oform, "username");
_IEFormElementSetValue ($oQuery1,GUICtrlRead ($Input1));
$oQuery2 = _IEFormElementGetObjByName ($oform, "password")
_IEFormElementSetValue ($oQuery2,GUICtrlRead ($Input2));
_IEFormSubmit ($oform,0)
EndSwitch
WEnd |
|