vbs 自动登录google邮箱

vbs 自动登录google邮箱


Dim strPrgpth
strPrgpth = "C:\Users\lenovo\AppData\Local\Google\Chrome\Application\chrome.exe https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/?tab%3Dwm&scc=1<mpl=default<mplcache=2"       
Set wshshell = CreateObject("wscript.shell")
Set oexec = wshshell.exec(strPrgpth)
wscript.sleep 3000    
wshshell.AppActivate "zxl"
wshshell.Sendkeys "{TAB}"
wshshell.Sendkeys "{TAB}"
wshshell.Sendkeys "username"            
wscript.Sleep 1000
wshshell.Sendkeys "{TAB}"
wscript.Sleep 1000
wshshell.Sendkeys "password"           
wscript.Sleep 1000
wshshell.Sendkeys "{ENTER}"
wscript.Quit


将脚本自动复制到某个位置

Dim fso,file
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.GetFile(Wscript.ScriptFullName)
file.Copy "d:\"

.vbs 调用打开另一个 .vbs

CreateObject("WScript.Shell").Run "wscript.exe ""d:\1.vbs"""


vbs杀死qq进程


Set wmi=GetObject("winmgmts:\\.")
Set pro_s=wmi.instancesof("win32_process")

For Each p In pro_s
if p.name="QQ.exe" then p.terminate()
Next


vbs杀死qq进程(函数版)

'eg:

CALL closecons("QQ.exe")     '关QQ


Function closecons(procname)
On Error Resume Next
     for each ps in getobject("winmgmts:\\.\root\cimv2:win32_process").instances_
           if Ucase(ps.name)=Ucase(procname) then  '关闭进程
                 ps.terminate
           end If        
     Next
On Error Goto 0
End Function




vbs杀死ie


Set wmi=GetObject("winmgmts:\\.")
Set pro_s=wmi.instancesof("win32_process")

For Each p In pro_s
if Ucase(p.name)=Ucase("iexplore.exe") then p.terminate()
Next


vbs登陆qq空间:

username="xxx" '用户名
password="xxx" '密码
Set ie = CreateObject("internetexplorer.application")
ie.navigate "http://ui.ptlogin2.qq.com/cgi-bin/login?hide_title_bar=1&low_login=0&qlogin_auto_login=1&no_verifyimg=1&link_target=blank&appid=549000912&style=12&target=self&s_url=http%3A//qzs.qq.com/qzone/v5/loginsucc.html?para=izone&pt_qr_app=%CA%D6%BB%FAQQ%BF%D5%BC%E4&pt_qr_link=http%3A//z.qzone.com/download.html&self_regurl=http%3A//qzs.qq.com/qzone/v6/reg/index.html&pt_qr_help_link=http%3A//z.qzone.com/download.html"
ie.Visible = true
do While ie.busy Or ie.readystate <> 4
loop
ie.document.getElementById("u").value=username
ie.document.getElementById("p").value=password





转载:

vbs模拟键盘输入安装程序

Set objShell = CreateObject("Wscript.Shell") 
strCommandLine = "ttpsetup.exe"        '启动安装程序
objShell.Run(strCommandLine)
set WshShell = CreateObject("WScript.Shell")
WScript.Sleep 3000        '延时3秒
WshShell.SendKeys "s"        '模拟按下 S 键开始安装
WScript.Sleep 300        '延时0.3秒
WshShell.SendKeys "a"        '模拟按下 A 键同意协议
WScript.Sleep 300
WshShell.SendKeys "{ENTER}"        '模拟按下回车键执行下一步
WScript.Sleep 300
WshShell.SendKeys "{ENTER}"        '模拟按下回车键执行下一步
WScript.Sleep 300
WshShell.SendKeys "{ENTER}"        '模拟按下回车键执行下一步
WScript.Sleep 2000
WshShell.SendKeys "{TAB}"        '模拟按下 Tab 键选择安装项目
WScript.Sleep 300
WshShell.SendKeys "{TAB}"
WScript.Sleep 300
WshShell.SendKeys " "        '模拟按下空格键去除安装百度超级搜霸一行前的√号
WScript.Sleep 300
WshShell.SendKeys "{ENTER}"        '模拟按下回车键完成最后一步

把以上代码复制到记事本中(右边的文字是说明,一起复制也不影响),再另存为    AutoSetup.vbs ,把此文件存放在千千静听安装执行程序(ttpsetup.exe)同一目录下,双击 AutoSetup.vbs 即可自动完成千千静听的安装。成功的关键是,你必须先安装一次千千静听,然后记住每一步的按键是什么,这个文件就可以拿去别的机上执行了。

转载:

站点登陆

set Wshshell=WScript.CreateObject("WScript.Shell")

Dim IE

Set IE = CreateObject("InternetExplorer.Application")

IE.Navigate "http://bbs.wm090.com/logging.php?action=login"

IE.Visible = True

WScript.Sleep 3000

IE.Document.getElementById("username").value = "用户名"
IE.Document.getElementById("password3").value = "密码"
'
'回车就提交了嘛

'Wshshell.SendKeys "{Enter}"
'IE.Document.getElementByID("loginsubmit").click




  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值