标题: [其他] 自动登录网站vbs代码转bat [打印本页]
作者: zjhuzi 时间: 2009-4-30 20:23 标题: 自动登录网站vbs代码转bat
-
- set WshShell = CreateObject("WScript.Shell")
- WshShell.Run "iexplore"
- WScript.Sleep 2000
- WshShell.AppActivate " about:blank - Microsoft Internet Explorer"
- wshshell.SendKeys "%d"
- wshshell.SendKeys "http://172.19.1.8/selfLogon.do"
- wshshell.SendKeys "{enter}"
- WScript.Sleep 2000
- wshshell.SendKeys "用户名"
- wshshell.SendKeys "{tab}"
- wshshell.SendKeys "密码"
- wshshell.SendKeys "{enter}"
复制代码
我不是伸手党,我真的不会.
作者: null 时间: 2009-4-30 20:26
bat好像不能做到SENDKEY吧
作者: zjhuzi 时间: 2009-4-30 22:48 标题: 回复 2楼 的帖子
- @echo off
- >"%temp%\TelFile.vbs" echo Set WshShell = CreateObject("WScript.Shell")
- >>"%temp%\TelFile.vbs" echo WshShell.Run "telnet IP"
- >>"%temp%\TelFile.vbs" echo WScript.Sleep(5000)
- >>"%temp%\TelFile.vbs" echo WshShell.SendKeys "USERNAME{enter}"
- >>"%temp%\TelFile.vbs" echo WScript.Sleep(1000)
- >>"%temp%\TelFile.vbs" echo WshShell.SendKeys "PASSWORD{enter}"
- start cscript /nologo "%temp%\TelFile.vbs"
复制代码
作者: Batcher 时间: 2009-4-30 22:50 标题: 回复 3楼 的帖子
你这不是自己搞定了吗,还有其它问题没?
欢迎光临 批处理之家 (http://bbs.bathome.net/) |
Powered by Discuz! 7.2 |