批处理文件模拟一些事情

我想打开QQ登陆界面后
双击运行批处理就会自动输入我的QQ帐号和密码


用VBS键盘模拟不就可以了
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Exec "C:\Program Files\Tencent\QQ\QQ.exe"
WScript.Sleep 500
WshShell.SendKeys "号码"
WScript.Sleep 1000
WshShell.SendKeys "{TAB}"
WScript.Sleep 500
WshShell.SendKeys "密码"
WScript.Sleep 500
WshShell.SendKeys "{ENTER}"

如果自己的电脑记住了账号只需输密码就这样
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Exec "C:\Program Files\Tencent\QQ\QQ.exe"
WScript.Sleep 500
WshShell.SendKeys "密码"
WScript.Sleep 500
WshShell.SendKeys "{ENTER}"

保存为qq.vbs 路径自己改  运行就可以了

你可能感兴趣的:(C++,c,qq,C#)