QQ自动登陆的VBS脚本
Dim WshShell, QQPath, QQselect
QQPath="c:\Progra~1\Tencent\qq\qq.exe" 'QQ所在路径
Set WshShell=WScript.CreateObject("WScript.Shell")
WshShell.Run QQPath
WScript.Sleep 2000
WshShell.AppActivate "QQ登录1"
WshShell.SendKeys "+{TAB}"
WshShell.SendKeys "123456789" 'QQ号码
WScript.Sleep 200
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "123456789" 'QQ密码
WScript.Sleep 200
WshShell.SendKeys "{ENTER}"
复制以上代码并保存为“*.VBS”,并运行便可以了。另外因为在命令行下,只支持8位字符长度的文件名,所以像“Program Files”的这种文件名就要改写成“Progra~1”。如果想同时登陆多个QQ,只需再增加下面那样的代码就可以了。
WScript.Sleep 2000
QQPath="D:\Progra~1\Tencent\qq\qq.exe" 'QQ所在路径
Set WshShell=WScript.CreateObject("WScript.Shell")
WshShell.Run QQPath
WScript.Sleep 2000
WshShell.AppActivate "QQ登录1"
WshShell.SendKeys "+{TAB}"
WshShell.SendKeys "123456789" 'QQ号码
WScript.Sleep 200
WshShell.SendKeys "{TAB}"
WshShell.SendKeys "123456789" 'QQ密码
WScript.Sleep 200
WshShell.SendKeys "{ENTER}"