找回密码
 加入
搜索
查看: 2457|回复: 10

关于ie的操作的问题,谢谢!登陆和发帖子~

[复制链接]
发表于 2008-12-3 22:32:34 | 显示全部楼层 |阅读模式
看了大大的教程,也想学习一下。
不过我们学校的论坛是动网7.1的,很老的版本
根据教程上说要先获取表单的名字,结果,运行之后,表单名字确实0,不知道怎么回去
希望大大帮忙看看。。。

谢谢啦!

想实现登陆和发帖。。。

论坛地址:http://www.ncepubbs.cn/bbs/login.asp

里面那个验证版会自动载入的,就自用要填写密码和用户名,还有选择一下Cookie 选项和隐身登陆


谢谢啦!!!

[ 本帖最后由 gift8188 于 2008-12-5 09:57 编辑 ]
 楼主| 发表于 2008-12-4 00:43:31 | 显示全部楼层
顶一下呢,别沉了
 楼主| 发表于 2008-12-4 19:24:59 | 显示全部楼层
发表于 2008-12-5 10:09:01 | 显示全部楼层
代码呢?
发表于 2008-12-5 15:33:12 | 显示全部楼层

$oIE = ObjCreate("InternetExplorer.Application")
$oIE.visible = 1
$oIE.navigate('http://www.ncepubbs.cn/bbs/login.asp')
$oIE.height = @DesktopHeight
$oIE.width = @DesktopWidth
Do
        Sleep(100)
Until $oIE.readyState = 4
$oIE.document.getElementById('username').value = 'username'
$oIE.document.getElementById('password').value = 'password'
$oIE.document.getElementsByName('CookieDate').item(3).checked = 1
$oIE.document.getElementsByName('userhidden').item(1).checked = 1
Sleep(1000)
$oIE.document.getElementById('submit').click


[ 本帖最后由 liongodmien 于 2008-12-5 20:00 编辑 ]
 楼主| 发表于 2008-12-5 19:42:28 | 显示全部楼层
原帖由 liongodmien 于 2008-12-5 15:33 发表
[au3]
$oIE = ObjCreate("InternetExplorer.Application")
$oIE.visible = 1
$oIE.navigate('http://www.ncepubbs.cn/bbs/login.asp')
Do
        Sleep(100)
Until $oIE.readyState = 4
$oIE.document.getElementBy ...


这个代码似乎有问题


这个可以的:


#include <IE.au3>

$oIE = _IECreate("http://www.ncepubbs.cn/bbs/login.asp",0,1,1,1 )

_IELoadWait ($oIE)

$UserName = _IEGetObjById ($oIE, "username")
If IsObj($UserName) Then $UserName.value = "username"
$PassWord = _IEGetObjById ($oIE, "password")
If IsObj($PassWord) Then $PassWord.value = "PassWord"
$oIE.document.getElementsByName('CookieDate').item(3).checked = 1
$oIE.document.getElementsByName('userhidden').item(1).checked = 1
$submit = _IEGetObjById ($oIE, "submit")
If IsObj($submit) Then $submit.click
发表于 2008-12-5 20:00:08 | 显示全部楼层
的确是有点问题,输出用错了

$oIE = ObjCreate("InternetExplorer.Application")
$oIE.visible = 1
$oIE.navigate('http://www.ncepubbs.cn/bbs/login.asp')
$oIE.height = @DesktopHeight
$oIE.width = @DesktopWidth
Do
        Sleep(100)
Until $oIE.readyState = 4
$oIE.document.getElementById('username').value = 'username'
$oIE.document.getElementById('password').value = 'password'
$oIE.document.getElementsByName('CookieDate').item(3).checked = 1
$oIE.document.getElementsByName('userhidden').item(1).checked = 1
Sleep(1000)
$oIE.document.getElementById('submit').click
 楼主| 发表于 2008-12-5 20:11:22 | 显示全部楼层
原帖由 liongodmien 于 2008-12-5 20:00 发表
的确是有点问题,输出用错了
[au3]
$oIE = ObjCreate("InternetExplorer.Application")
$oIE.visible = 1
$oIE.navigate('http://www.ncepubbs.cn/bbs/login.asp')
$oIE.height = @DesktopHeight
$oIE.width = ...


恩这个代码,没问题!谢谢老大!
发表于 2009-7-3 09:04:36 | 显示全部楼层
$oIE = ObjCreate("InternetExplorer.Application")

$oIE = _IECreate("http://www.ncepubbs.cn/bbs/login.asp",0,1,1,1 )

这两种方法之间有何异同呢?
发表于 2010-6-22 15:03:28 | 显示全部楼层
一样,没有什么不同啊。
发表于 2013-3-1 19:59:36 | 显示全部楼层
可以学习一下
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-29 11:30 , Processed in 0.078257 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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