找回密码
 加入
搜索
查看: 2931|回复: 5

[IE类操作] 请教,针对以下例子,如何用AU-3实现自动登录?谢谢

[复制链接]
发表于 2012-2-10 10:42:47 | 显示全部楼层 |阅读模式
本帖最后由 Hill27 于 2012-2-13 09:51 编辑

<div id="Layer2" style="position:absolute; width:632px; height:206px; z-index:2; left: 322px; top: 214px;">
<form method="post" name="setform" action="do.asp" onsubmit="return verify_form()">

  <p align="center">&nbsp;</p>
  <p align="center">&nbsp;</p>
  <p align="center">&nbsp;</p>
  <p align="center">&nbsp;</p>
  <blockquote>
    <blockquote>
      <p align="left"> <span class="style2">用户名:</span><font size="2">         
        <input type="text" name="t1" size="12" >
          </font>
              <font size="2">
              &nbsp;<strong>&nbsp;</strong></font></p>
      <p align="left"><span class="style2">密&nbsp;&nbsp;码:</span><font size="2">
           <input type="password" name="t2" size="12">
                                  </font>
                  &nbsp;
              <input type="submit" value="进入系统" name="B1" style="background-color: #00FF00">
   
      
                  &nbsp;  &nbsp;  
                  <input type="button" value="更改密码" name="B1" style="background-color: #00FF00" onClick="window.location.href='changmm.asp'"></p>               
   </p>
    </blockquote>
  </blockquote>
  </form>
</div>
已解决
;做演示用了,缺少判断语句的
#include <IE.au3>
$oIE = _IECreate("http://*.0.178.*:8080/index.asp")
_IELoadWait($oIE)

$Input = _IEGetObjByName($oIE, "t1");用户名
$Input.value = "222222" ;为其赋值,
$Input1 = _IEGetObjByName($oIE, "t2");密码
$Input1.value = "999999" ;为其赋值,

$OK = _IEGetObjByID($oIE, "B1");通过工具查询到得登陆按钮ID值
$OK.click ;点击登陆按钮
发表于 2012-2-10 10:49:46 | 显示全部楼层
不懂,这个是网页源代码?
 楼主| 发表于 2012-2-10 11:35:31 | 显示全部楼层
是网页的代码
 楼主| 发表于 2012-2-10 14:43:49 | 显示全部楼层
在线等在线等
 楼主| 发表于 2012-2-10 14:49:19 | 显示全部楼层
自己弄了下;做演示用了,缺少判断语句的
#include <IE.au3>
$oIE = _IECreate("http://*.0.178.*:8080/index.asp")
_IELoadWait($oIE)

$Input = _IEGetObjByName($oIE, "t1");用户名
$Input.value = "222222" ;为其赋值,
$Input1 = _IEGetObjByName($oIE, "t2");密码
$Input1.value = "999999" ;为其赋值,

$OK = _IEGetObjByID($oIE, "B1");通过工具查询到得登陆按钮ID值
$OK.click ;点击登陆按钮
 楼主| 发表于 2012-2-13 09:50:37 | 显示全部楼层
已解决,谢谢
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-21 18:04 , Processed in 0.081392 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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