中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 会员 | 搜索 | 上传 | 帮助 »
作者:
标题: [原创]VBS 登陆QQ。 上一主题 | 下一主题
killkk
初级用户





积分 61
发帖 39
注册 2007-3-22
来自 come from hb--wh
状态 离线
『楼 主』:  [原创]VBS 登陆QQ。

On Error Resume Next
QQLogin = "C:\Progra~1\QQ2009\Bin\QQ.exe"
Set WshShell = Wscript.CreateObject("Wscript.Shell")
Dim QQNumber,QQPW
QQNumber = Inputbox("请输入QQ号码:","登陆QQ")
QQPW = Inputbox("请输入QQ密码",  "登陆QQ")
If QQNumber = "" Or QQPW = ""        Then
                Msgbox "搞什么?QQ号码或密码不能为空啊,快检查下吧。", "16","通知"
                Wscript.Quit
End If
MsgBox "你要登陆的QQ是:" &QQNumber,"32","通知"
Wscript.Sleep 2000
WshShell.Run QQLogin
Wscript.Sleep 2000
WshShell.Sendkeys "+{Tab}"
Wscript.Sleep 1000
WshShell.Sendkeys QQNumber
WshShell.Sendkeys "{Tab}"
Wscript.Sleep 1000
WshShell.Sendkeys QQPW
Wscript.Sleep 1000

Status = Inputbox ("请选择状态:1.我在线上,2.Q我吧,3.离开,4.忙碌,5.请勿打扰,6,隐身","状态选择")
Select Case Status
Case "1"
WshShell.Sendkeys "{Tab}"
WshShell.Sendkeys "{Enter}"
Wscript.Sleep 1000
WshShell.Sendkeys "{DOWN}"
WshShell.Sendkeys "{Enter}"
WshShell.Sendkeys "{Tab}"
WshShell.Sendkeys "{Enter}"

Case "2"
WshShell.Sendkeys "{Tab}"
WshShell.Sendkeys "{Enter}"
WshShell.Sendkeys "{DOWN}"
Wscript.Sleep 1000
WshShell.Sendkeys "{DOWN}"
Wscript.Sleep 1000
WshShell.Sendkeys "{Enter}"
WshShell.Sendkeys "{Tab}"
WshShell.Sendkeys "{Enter}"

Case "3"
WshShell.Sendkeys "{Tab}"
WshShell.Sendkeys "{Enter}"
WshShell.Sendkeys "{DOWN}"
Wscript.Sleep 1000
WshShell.Sendkeys "{DOWN}"
Wscript.Sleep 1000
WshShell.Sendkeys "{DOWN}"
Wscript.Sleep 1000
WshShell.Sendkeys "{Enter}"
WshShell.Sendkeys "{Tab}"
WshShell.Sendkeys "{Enter}"

Case "4"
WshShell.Sendkeys "{Tab}"
WshShell.Sendkeys "{Enter}"
WshShell.Sendkeys "{UP}"
Wscript.Sleep 1000
WshShell.Sendkeys "{UP}"
Wscript.Sleep 1000
WshShell.Sendkeys "{UP}"
Wscript.Sleep 1000
WshShell.Sendkeys "{Enter}"
WshShell.Sendkeys "{Tab}"
WshShell.Sendkeys "{Enter}"

Case "5"
WshShell.Sendkeys "{Tab}"
WshShell.Sendkeys "{Enter}"
WshShell.Sendkeys "{UP}"
Wscript.Sleep 1000
WshShell.Sendkeys "{UP}"
Wscript.Sleep 1000
WshShell.Sendkeys "{Enter}"
WshShell.Sendkeys "{Tab}"
WshShell.Sendkeys "{Enter}"

Case "6"
WshShell.Sendkeys "{Tab}"
WshShell.Sendkeys "{Enter}"
WshShell.Sendkeys "{UP}"
Wscript.Sleep 1000
WshShell.Sendkeys "{Enter}"
WshShell.Sendkeys "{Tab}"
WshShell.Sendkeys "{Enter}"

Case Else
Msgbox "笨蛋,出错啦!你忘了选择状态。重新来过吧。。","16","请选择状态。"
WshShell.Run "cmd.exe /c taskkill /f /im qq.exe /t",VBhide
End Select

PS: 闭来没事,学习学习VBS脚本,呵呵。。可以完美的地方高手请不吝赐教。谢谢。。
运行时请把QQLogin路径改成自己的。

   此帖被 +1 点积分    点击查看详情   
评分人:【 xue1995 分数: +1  时间:2010-4-5 11:00


2010-3-31 22:59
查看资料  发送邮件  发短消息 网志  OICQ (75403481)  编辑帖子  回复  引用回复
killkk
初级用户





积分 61
发帖 39
注册 2007-3-22
来自 come from hb--wh
状态 离线
『第 2 楼』:  

郁闷。咋传不了附件。。。

2010-4-2 00:14
查看资料  发送邮件  发短消息 网志  OICQ (75403481)  编辑帖子  回复  引用回复
HAT
版主





积分 9023
发帖 5017
注册 2007-5-31
状态 离线
『第 3 楼』:  

这个代码需要传附件么?



2010-4-2 03:12
查看资料  发短消息 网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: