本帖最后由 风行者 于 2016-10-17 20:50 编辑
网页.au3是网页源码
#include <IE.au3>
Local $oIE = _IECreateEmbedded()
#Region - GUI Create
GUICreate('测试', 500, 500)
GUICtrlCreateObj($oIE, 0, 0, 500, 500)
GUISetState(@SW_SHOW)
#EndRegion - GUI Create
_IENavigate($oIE, "about:blank")
_IEDocWriteHTML($oIE, FileRead("网页.au3"))
_IEAction($oIE, "refresh")
Local $user = _IEGetObjByName($oIE, "username")
_IEFormElementSetValue($user, "myname")
Local $pw = _IEGetObjByName($oIE, "password")
_IEFormElementSetValue($pw, "123456")
Sleep(2000) ;看效果
$sum = _IETagNameGetCollection($oIE, "em", 0)
$sum.click()
While 1
If GUIGetMsg() = -3 Then Exit
Sleep(100)
WEnd
|