|
我想做了自动登陆网站的脚本,但运行到这里就卡住了,,手动取消后再点应用脚本可以继续运行 我的代码如下
$pu = _IECreate("https://192.168.1.230/NetCafe/login.do")
_IELoadWait($pu)
$Input = _IEGetObjById($pu, "userName")
$Input.value = $Name2
$Input = _IEGetObjById($pu, "password")
$Input.value = $Pass2
$submit = _IEGetObjById($pu, "Image1")
_IEAction($submit,"click")
$zc = _IECreate("https://192.168.1.230/NetCafe/reRegister.jsp")
_IELoadWait($zc)
$Input = _IEGetObjById($zc, "clientID")
$Input.value = $Name3
$Input = _IEGetObjById($zc, "registerPwd")
$Input.value = $Pass3
$submit = _IEGetObjById($zc, "Image3")
_IEAction($submit,"click")
WinWait("Microsoft Internet Explorer","")
WinActivate("Microsoft Internet Explorer","")
ControlClick("Microsoft Internet Explorer","",2)
$123 = _IECreate("https://192.168.1.230/NetCafe/config/treeBottom.jsp#")
$button = _IEGetObjById($123, "Image47")
_IEAction($button,"click")
WinWait("Microsoft Internet Explorer","")
WinActivate("Microsoft Internet Explorer","")
ControlClick("Microsoft Internet Explorer","",1)
到这里就卡住了非要手动关了在点一次才会继续运行下面的脚本,
$button = _IEGetObjById($123, "Image47")
_IEAction($button,"click")
把后面的换成SEND也不行。
这是网站源码
<html>
<HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<SCRIPT src="../js/tree.js"></SCRIPT>
<script src="../js/common.js"></script>
<script language="javascript">
<!--
function updateConfig(){
//update the config
if(!confirm("是否要和中心同步最新更改过的配??")){
return;
}else{
var chasm = screen.availWidth;
var mount = screen.availHeight;
var w = 300;
var h = 125;
window.open ("configUpdate.do;jsessionid=E39C4A78C93CAB770F5968D05EB26DB8", "newwindow", "height=" + h + ", width=" + w + ", top=" + ((mount - h - 30) * .5) + ", left=" + ((chasm - w - 10) * .5) + ", toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no")
self.location.reload();
}
}
function consoleUpdate(){
//update console
if(!confirm("是否要通知控制台立即更新配??")){
return;
}else{
var chasm = screen.availWidth;
var mount = screen.availHeight;
var w = 300;
var h = 125;
window.open ("consoleUpdate.do;jsessionid=E39C4A78C93CAB770F5968D05EB26DB8", "newwindow", "height=" + h + ", width=" + w + ", top=" + ((mount - h - 30) * .5) + ", left=" + ((chasm - w - 10) * .5) + ", toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no")
}
}
-->
</script>
<title></title>
<link href="../css/design.css" rel="stylesheet" type="text/css">
<link href="../css/deeptree.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-image: url();
background-color: #bbbbbb;
}
-->
</style><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></HEAD>
<body onLoad="MM_preloadImages('../images/button_yy_b.gif')">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="left">
<!--
<td><a href="#" onClick="javaScript:updateConfig()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image48','','../images/button_gx_b.gif',1)"><img src="../images/button_gx_a.gif" alt='从中心更新最新配?? name="Image48" width="50" height="16" border="0"></a></td>
-->
<td><a href="#" onClick="javaScript:consoleUpdate()" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image47','','../images/button_yy_b.gif',1)"><img src="../images/button_yy_a.gif" name="Image47" width="50" height="16" border="0"></a></td>
<td> </td>
</tr>
</table></td>
</tr>
</table>
</body>
</html> |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?加入
×
|