'第一部分:定义变量和对象 Dim WshShell,QQPath, QQselect QQPath="""D:\Program Files\QQ\QQ.exe""" Set WshShell=WScript.CreateObject("WScript.Shell") '第二部分:显示主界面 QQselect=InputBox("请输入要登录的QQ号码序号:" &Chr(13)&Chr(10)& "1:35544216" &Chr(13)&Chr(10)& "2:1071237" &Chr(13)&Chr(10)& "3:手工登录", "QQ自动登录器") If QQselect="" Then WScript.Quit '第三部分:运行并激活QQ窗口 WshShell.Run QQPath WScript.Sleep 2000 WshShell.AppActivate "QQ用户登录"
'第四部分:选择序号"1"时自动登录号码123456 If QQselect="1" Then WshShell.SendKeys "+{TAB}" WshShell.SendKeys "123456" WScript.Sleep 200 WshShell.SendKeys "{TAB}" WshShell.SendKeys "22222" WScript.Sleep 200 WshShell.SendKeys "{ENTER}"
'第五部分:选择序号"2"时自动登录号码1071237 Else If QQselect = "2" Then WshShell.SendKeys "+{TAB}" WshShell.SendKeys "1071237" WScript.Sleep 200 WshShell.SendKeys "{TAB}" WshShell.SendKeys "填入密码" WScript.Sleep 200 WshShell.SendKeys "{ENTER}" End If End If
|