找回密码
 加入
搜索
查看: 4867|回复: 3

[AU3基础] _IEAction 后卡住了 手动点后正常运行,大哥们进来帮忙下啊

[复制链接]
发表于 2010-4-11 16:10:03 | 显示全部楼层 |阅读模式
我想做了自动登陆网站的脚本,但运行到这里就卡住了,,手动取消后再点应用脚本可以继续运行 我的代码如下
$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>&nbsp;</td>
                                </tr>
</table></td>
  </tr>
</table>
</body>
</html>

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
 楼主| 发表于 2010-4-11 16:12:29 | 显示全部楼层
非要关了再点一次,手动点弹出来的才会继续下一步。。。。能帮我看看是怎么回事吗
 楼主| 发表于 2010-4-11 16:19:10 | 显示全部楼层
有人帮我看看吗。。
 楼主| 发表于 2010-4-11 17:24:36 | 显示全部楼层
额。。。能弄好吗
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-20 15:19 , Processed in 0.085406 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表