Skip to content

Instantly share code, notes, and snippets.

@vamdt vamdt/autologin.vbs
Created Jan 1, 2014

Embed
What would you like to do?
'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
You can’t perform that action at this time.