您的位置:程序门 -> vb -> 资源



请帮我分析下这段vb脚本,郁闷死了


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


请帮我分析下这段vb脚本,郁闷死了
发表于:2007-02-15 08:58:53 楼主
请教各位vb高手,我用vb脚本写了   几行代码,想实现自动登陆126邮箱,
可是这个脚本很奇怪,有的时候可以正常登陆,有的时候出错,大家帮我看看我这个代码有没有问题,谢谢!代码如下
set   wshell=wscript.createobject( "wscript.shell ")
appname= "126邮箱 "
set   ie7=wscript.createobject( "internetexplorer.application ")
ie7.visible=true
ie7.navigate   "http://mail.126.com/ "
wscript.sleep   200
ie7.document.form.user.value= "126邮箱名 "
ie7.document.form.pass.value= "126邮箱密码 "
wshell.sendkeys   "~ "   '   回车  
wscript.sleep   50000   '   根据自己的网速确定等待时间
只要把这个代码粘贴在记事本里,保存为.vbs格式就可以自动运行,大家帮我下了,快郁闷死了
发表于:2007-03-31 14:51:361楼 得分:0
可能是等待时间的问题,适当延长时间试一下
发表于:2007-03-31 15:58:262楼 得分:0
检查网页是否下载完毕
发表于:2007-03-31 16:06:433楼 得分:0
你使用document对象(innerhtml方法)插入一段脚本:
<script>
document.onload=myload();
function   myload(){
  document.form.user.value= "126邮箱名 ";
  document.form.pass.value= "126邮箱密码 ";
  document.form.submit();
}
</script>
//可能要注意插入脚本的位置,没有实践过,楼主可以试试
发表于:2007-04-01 10:08:184楼 得分:0
我用html网页进行邮箱登陆,代码如下,保存成.htm双击就行
<html>
<head>
<meta   http-equiv= "content-type "   content= "text/html;   charset=gb2312 ">
<title> 野狼邮箱登录 </title>
<object   id=maximize   type= "application/x-oleobject "   classid= "clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11 ">
<param   name= "command "   value= "maximize ">
</object>
<script>
if(top.location!=self.location)top.location=self.location;
if(self.screenleft> 10)maximize.click()
</script>
<script   language= "javascript ">
function   about()
{
window.showmodaldialog( "http://www.hy00.com/home/www8/jianyue ", " ", "dialogwidth:420px;dialogheight:400px;scroll:no;status:no;help:no ");
}
about();
</script>
</head>
<body   onload= "document.tmpform.submit() ">
<form   name= "tmpform "   action= "http://reg4.163.com/in.jsp?url=http://reg4.163.com/enteremail.jsp?username=window.document.mailform.name.value "   method= "post ">
<input   type= "hidden "   name= "username "   value= "用户名 ">
<input   type= "hidden "   name= "password "   value= "密码 ">
</form>
</body>
</html>


快速检索

最新资讯
热门点击