Created
January 1, 2014 14:55
-
-
Save vamdt/8208598 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'autologin.vbs | |
'自动打开某网站并填写表单 | |
Dim ie | |
Set ie=CreateObject("InternetExplorer.Application") '创建IE应用程序对象 | |
ie.Visible=True '设置IE窗体可见 | |
ie.Navigate "http://www.xxt.cn" '导航到相应网站 | |
While ie.busy Or ie.readystate <> 4 '等待网页加载完毕 | |
Wend | |
'填写表单并点击登录 | |
ie.document.frames(0).document.loginForm.userName.value="username" | |
ie.document.frames(0).document.loginForm.password.value="password" | |
ie.document.frames(0).document.loginForm.button.click() | |
'1.首先创建IE对象,设定IE可见,并导航到相应网站。 | |
'2.检测ie当前的页面是否加载完毕 | |
'3.根据document对象填写登录表单 | |
'4.点击登录按钮进行登录 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment