TAIDONG - 2018年1月 https://www.zhangtaidong.cn/2018/01/ zh-CN TAIDONG's Blog Fri, 05 Jan 2018 10:44:00 +0800 Fri, 05 Jan 2018 10:44:00 +0800 Windows自动启动程序并登陆账号密码的VBS脚本 https://www.zhangtaidong.cn/archives/44/ https://www.zhangtaidong.cn/archives/44/ Fri, 05 Jan 2018 10:44:00 +0800 TAIDONG dim program program="程序路径" set Wshell=CreateObject("Wscript.Shell") set oexec=Wshell.Exec(program) wscript.Sleep 2000 Wshell.SendKeys "{TAB}" Wshell.SendKeys "{TAB}" Wshell.SendKeys "账号" wscript.Sleep 1000 Wshell.SendKeys "{TAB}" Wshell.SendKeys "密码" Wshell.SendKeys "{TAB}" Wshell.SendKeys "{TAB}" Wshell.SendKeys "{TAB}" Wshell.SendKeys "{ENTER}" Wscript.quit

新建文本文档,并复制内容,保存。修改文件后缀为“filename.vbs”。即可双击运行
备注:这是VBS脚本,可以实现简单的程序自动输入账号密码登陆,中间的TAB次数根据不同的程序会有不同的差异,请自行调整。

]]>
0 https://www.zhangtaidong.cn/archives/44/#comments https://www.zhangtaidong.cn/feed/2018/01/