好友
阅读权限10
听众
最后登录1970-1-1
|
Visual Basic代码
'(1)检测当前电脑是否挂着QQ:
Set TCK = CreateObject("TimwpDll.TimwpCheck")
isQQRunning = TCK.checkQQRunning
If isQQRunning Then
MsgBox "QQ在线"
Else
MsgBox "QQ离线"
End If
'(2)让QQ显示“正在玩的游戏”的信息:
Function PutRSInfo(uin, strRSPrompt, strRSParam)
Set o = CreateObject("QQCPHelper.CPAdder")
If Not strRSPrompt = "" And Not strRSParam = "" Then
o.PutRSInfo uin, 65572, strRSPrompt, strRSParam
'o.PutRSInfo uin, &H10024, strRSPrompt, strRSParam
End If
End Function
PutRSInfo 495825947,"正在3366玩《植物大战僵尸无敌版》","50521"
PutRSInfo 495825947,"3366小游戏","10000"
PutRSInfo 495825947,"3366游戏中","param"
'例:
'代码:
'PutRSInfo {QQ号码},"{要显示的游戏名称}","{param}"
'打开的地址是:
'http://www.3366.com/?ADUIN={QQ号码}&ADSESSION=1354419693&ADTAG=CLIENT.QQ.4693_{param}.0
'(3)打开QQ登录框,自动选取指定QQ号:
Dim o As Object
Set o = CreateObject("QQCPHelper.CPAdder")
o.StartupIM "{要登录的QQ号}"
'(4)QQ自动添加表情:
STR="http://www.baidu.com/img/baidu_logo.gif"
Addface(STR)
Sub Addface(strurl)
Dim QQ1
set QQ1 = CreateObject("TimwpDll.TimwpCheck")
If (QQ1.CheckValid) Then
Dim QQ2
set QQ2 = CreateObject("QQCPHelper.CPAdder")
QQ2.AddCustomEmotion(strurl)
Else
If Not file("QQ.EXE") Then
Dim WSH
set WSH = CreateObject("wscript.Shell")
WSH.Run "D:QQBinQQ.exe" '这里改为实际路径
Wsh.AppActivate "QQ"
WScript.Sleep 1000
WSH.SendKeys "{ENTER}"
End If
Call Addface(STR)
End If
End Sub
Function File(fileName)
'On Error Resume Next
File = False
for each ps in getobject("winmgmts:.rootcimv2:win32_process").instances_ '循环进程
if Ucase(ps.name)=Ucase(fileName) Then
File=True
Exit For
End If
Next
End Function
'(5)TimwpDllVersion:
Set TCK = CreateObject("TimwpDll.TimwpCheck")
TimwpDllVersion = TCK.GetVersion()
MsgBox TimwpDllVersion
Function IsInstallSupMiniQQ()
Set TCK = CreateObject("TimwpDll.TimwpCheck")
TimwpDllVersion = TCK.GetVersion()
IsInstallSupMiniQQ = True
If TimwpDllVersion < 2.1 Then
IsInstallSupMiniQQ = False
End If
End Function
'(6)QQ电脑管家相关:
Set QMPlugin = CreateObject("npQMExtensionsIE.Basic")
'If Browser.isIE Then
'bInstall = QMPlugin.QMIsInstalled()
'Else
'bInstall = QMPlugin.QMIsInstall()
'End If
getQMmgrVersion = QMPlugin.QMGetVersion() '返回管家版本号
getQmgrSupplyID = QMPlugin.QMGetSupplyID() '返回supplyid
MsgBox getQMmgrVersion, 64, "QMGetVersion()"
MsgBox getQmgrSupplyID, 64, "QMGetSupplyID()"
'Call QMPlugin.QMStartUp(index, parms)
Call QMPlugin.QMStartUp(16, "/traytip=1")
'sid = "1018"
'Call QMPlugin.QMStartUp(5, "/page=taskmgr /softdetailid=" & sid & " /action=download /parent=baidusearch")
'index(-1 < index < 23):
'0 QQPCMgr.exe
'1 QQPCTray.exe
'2 (Null)
'3 QQPCSysOptimize.exe
'4 QQPCSoftGame.exe
'5 QQPCSoftMgr.exe
'6 - 13 (Null)
'14 QQRepair.exe
'15 QQPCLaunch.exe
'16 QQPCClinic.exe
'17 QQPCHardware.exe
'18 - 19 (Null)
'20 QMPersonalCenter.exe
'21 (Null)
'22 QMAutoClean.exe
'解释:
'index(-1 < index < 23):
'0 打开“电脑管家”
'4 打开“软件管理” - “游戏专区”
'5 打开“软件管理” "/page=taskmgr /softdetailid=" & sid & " /action=download /parent=baidusearch" '开始下载某个软件,如“Total Commander”是“1018”。
'15 打开“小Q书桌”
'16
'/traytip=1 '打开 桌面右下角 的提示
'/from=1 /detail=1001 '打开“电脑诊所” - “QQ空间无法正常显示” |
|