求VB自动登陆QQ代码

来源:百度知道 编辑:UC知道 时间:2024/06/16 09:59:03
程序如下:
1、打开C:\Program Files\Tencent\QQ.exe
2、输入号码:1234567
3、输入密码:11111
4、登陆
我要的是源代码,谢谢!~

看看这个行不行。。
Private Sub Command1_Click()
Dim aaa
aaa = Shell("D:\QQ\QQ.exe", 1)
AppActivate aaa
'比如你的QQ是1234567
SendKeys "{1}", True
SendKeys "{2}", True
SendKeys "{3}", True
SendKeys "{4}", True
SendKeys "{5}", True
SendKeys "{6}", True
SendKeys "{7}", True
SendKeys "{tab}", True '不清楚tab键是不是这样
' 再像上面一样输入密码1111
SendKeys "{1}", True
SendKeys "{1}", True
SendKeys "{1}", True
SendKeys "{1}", True

SendKeys "{tab}", True
'焦点到登入按钮
SendKeys "{enter}", True '也不清楚是不是这样
End Sub

2008版的QQ密码是用先md5加密,然后base64加密后的值进行登录的
下面QQnum是帐号,qqpass是密码,qqpath是qq路径

Shell QQPath & " /START QQUIN:" & QQNum & " PWDHASH:" & "qqpass"