欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

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

程序员文章站 2022-07-06 13:01:22
复制代码 代码如下:on error resume nexturl = " http://www.bathome.net/logging.php?action=login"...
复制代码 代码如下:

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