本帖最后由 maoying 于 2009-5-18 23:59 编辑
写了段代码,想开启TL-WR340G路由的无线功能:
前半部分(用默认的用户名登录):
Run('C:\Program Files\Internet Explorer\IEXPLORE.EXE 192.168.1.1')
WinWait("Connect to 192.168.1.1","")
If Not WinActive("Connect to 192.168.1.1","") Then WinActivate("Connect to 192.168.1.1","")
WinWaitActive("Connect to 192.168.1.1","")
Send("{ENTER}");确认登录,图参见popup.gif:
后半部分:
#include <IE.au3>
$oIE = _IEAttach ("TL-WR340G 54M无线宽带路由器","Title")
$oFrame = _IEFrameGetObjByName ($oIE, "bottomLeftFrame")
_IELinkClickByText ($oFrame, "无线参数")
$oFrame = _IEFrameGetObjByName ($oIE, "mainFrame")
$oForm = _IEFormGetCollection ($oFrame, 0)
_IEFormElementCheckboxSelect ($oForm, 2, "ap", 1, "byValue") ;开启无线功能
$oQuery = _IEFormElementGetObjByName ($oForm, "Save")
_IEAction($oQuery ,"click")
分别运行都OK,但貌似合起来后就卡在$oIE那里
请各位指教一下 |