请教各位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格式就可以自动运行,大家帮我下了,快郁闷死了
可是这个脚本很奇怪,有的时候可以正常登陆,有的时候出错,大家帮我看看我这个代码有没有问题,谢谢!代码如下
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格式就可以自动运行,大家帮我下了,快郁闷死了
<script>
document.onload=myLoad();
function myLoad(){
document.form.user.value="126邮箱名";
document.form.pass.value="126邮箱密码";
document.form.submit();
}
</script>
//可能要注意插入脚本的位置,没有实践过,楼主可以试试
<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>