|
楼主 |
发表于 2010-6-24 11:40:21
|
显示全部楼层
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
_IEErrorHandlerRegister()
$oIE = _IECreateEmbedded()
GUICreate("CEO_IE VERSION AUTO RUN", 1200, 800, _
(@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
$WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN)
$GUIActiveX = GUICtrlCreateObj($oIE, 20, 45, 1200, 730)
$GUI_Button_1 = GUICtrlCreateButton("func_1", 10, 10, 100, 30)
$GUI_Button_2 = GUICtrlCreateButton("func_2", 120, 10, 100, 30)
$GUI_Button_3 = GUICtrlCreateButton("func_3", 230, 10, 100, 30)
$GUI_Button_4 = GUICtrlCreateButton("func_4", 340, 10, 100, 30)
$GUI_Button_OK = GUICtrlCreateButton("OK", 450, 10, 100, 30)
GUISetState() ;Show GUI
_IENavigate ($oIE, "http://web2.startravel.com.tw/OTHEF_tiki/login_OTHE.asp?PROD_NO=OTHE000003906#gologin")
sleep(3000)
WinWaitClose("Windows Internet Explorer","")
sleep(3000)
WinWaitActive("Windows Internet Explorer", "") ; <---------這裡不會點擊那個彈出來的小視窗
sleep(1000)
Send("{ENTER}")
;Send("{ENTER}")
;_IELoadWait ($oIE)
$oForm = _IEFormGetObjByName($oIE, "frmLOGIN")
$oQuery = _IEFormElementGetObjByName($oForm, "peoplenum1")
_IEFormElementOptionSelect($oQuery, 5, 1, "byIndex"); 0 是 funmily 1 是uid
$oQuery = _IEFormElementGetObjByName($oForm, "memid")
_IEFormElementSetValue($oQuery, "test6688")
$oQuery = _IEFormElementGetObjByName($oForm, "pwd")
_IEFormElementSetValue($oQuery, "6688test")
sleep(3000)
$Submit = _IEGetObjById ($oIE, "gologin") ; <---------------這裡不會點那個下一步的按鈕
$Submit.submit
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $msg = $GUI_Button_1
Case $msg = $GUI_Button_2
Case $msg = $GUI_Button_3
Case $msg = $GUI_Button_4
Case $msg = $GUI_Button_OK
$oSubmit = _IEGetObjByName ($oIE, "okKey") ;按下ok
_IEAction ($oSubmit, "click")
EndSelect
WEnd
GUIDelete()
Exit |
|