VBS 自动登录论坛的实现代码

 更新时间:2013年07月28日 20:15:20   作者:  
这篇文章主要介绍了如果通过vbs实现论坛自动登录的实现方法,其实主要利用了vbs操作网页表单的自动填写实现,喜欢的朋友可以试试
复制代码 代码如下:

on error resume next
url = " http://www.bathome.net/logging.php?action=login"
username = "***"
password = "***"
set ie = CreateObject("InternetExplorer.Application")
ie.visible = true
ie.Navigate url,4 ' " http://www.baidu.com"
do until 4=ie.readyState
    WScript.sleep 200
    waittime  = waittime + 200
    if waittime > 15000 then exit do
loop
'WScript.echo waittime
if 4<>ie.readyState then
    ie.quit
    WScript.quit
end if
set dom = ie.document
set form = dom.getElementById("loginform")
form.all("username").value = username
form.all("password").value = password
form.all("cookietime").checked = true
form.all("loginsubmit").click()


原文: http://www.enun.net/?p=1093

相关文章

最新评论