📄 template.vbs
字号:
Dim UserNum
Dim UserStatus
Dim Path
Dim strQQMailTip
Dim ShowStatus
Dim foldbottom
Dim bMsgInside
Dim CurrentWidth
Dim CurrentHeight
'注释
Sub Window_OnInit()
Window.GetScriptVersion "1.0"
UserStatus = "(离线)"
Path = "NewSkins\\%SkinName%\\"
ShowStatus = %ShowStatus%
UserNum = "0"
If 1 = ShowStatus Then
UserNum = UserNum + UserStatus
End If
strQQMailTip = ""
bMsginside = 0
End Sub
Sub Window_OnSize(cx,cy)
CurrentHeight = cy
CurrentWidth = cx
Window.LockPaint()
Folder.LockPaint()
If IsObject(MainSearchDlg) = TRUE Then
MainSearchDlg.LockPaint()
End If
If IsObject(MusicPlayer) = TRUE Then
MusicPlayer.LockPaint()
End If
%OnSize%
If IsObject(FolderBackgroundB) = TRUE Then
nPluginBottom = FolderBackgroundB.top + FolderBackgroundB.height
ElseIf IsObject(FolderBackgroundL) = TRUE Then
nPluginBottom = FolderBackgroundL.top + FolderBackgroundL.height
ElseIf IsObject(FolderBackground) = TRUE Then
nPluginBottom = FolderBackground.top + FolderBackground.height
Else
nPluginBottom = Folder.top + Folder.height
End If
If IsObject(MainSearchDlg) = TRUE Then
If MainSearchDlg.bInside = TRUE Then
MainSearchDlg.left = 2
MainSearchDlg.height = 28
MainSearchDlg.width = cx - 4
MainSearchDlg.top = nPluginBottom - MainSearchDlg.height
nPluginBottom = nPluginBottom - MainSearchDlg.height - 1
End If
End If
If IsObject(MusicPlayer) = TRUE Then
If MusicPlayer.bInside = TRUE Then
MusicPlayer.left = 2
MusicPlayer.height = 33
MusicPlayer.width = cx - 4
MusicPlayer.top = nPluginBottom - MusicPlayer.height
nPluginBottom = nPluginBottom - MusicPlayer.height - 1
End If
End If
nPluginDis = Folder.top + Folder.height - nPluginBottom
If nPluginDis > 0 Then
nPluginDis = nPluginDis + 2
Folder.height = Folder.height - nPluginDis
If IsObject(NewPanels) = TRUE Then
NewPanels.height = NewPanels.height - nPluginDis
End If
If IsObject(FolderBackgroundLB) = TRUE Then
FolderBackgroundLB.top = FolderBackgroundLB.top - nPluginDis
End If
If IsObject(FolderBackgroundRB) = TRUE Then
FolderBackgroundRB.top = FolderBackgroundRB.top - nPluginDis
End If
If IsObject(FolderBackgroundL) = TRUE Then
FolderBackgroundL.height = FolderBackgroundL.height - nPluginDis
End If
If IsObject(FolderBackgroundR) = TRUE Then
FolderBackgroundR.height = FolderBackgroundR.height - nPluginDis
End If
If IsObject(FolderBackgroundB) = TRUE Then
FolderBackgroundB.top = FolderBackgroundB.top - nPluginDis
End If
If IsObject(FolderBackgroundC) = TRUE Then
FolderBackgroundC.height = FolderBackgroundC.height - nPluginDis
End If
If IsObject(FolderBackground) = TRUE Then
FolderBackground.height = FolderBackground.height - nPluginDis
End If
End If
If IsObject(MailButton) = TRUE Then
MailButton.label = strQQMailTip
End If
Folder.UnLockPaint()
If IsObject(MainSearchDlg) = TRUE Then
MainSearchDlg.UnLockPaint()
End If
If IsObject(MusicPlayer) = TRUE Then
MusicPlayer.UnLockPaint()
End If
Window.UnLockPaint()
End Sub
'上面的三个按钮
Sub MinButton_onClick()
Window.ExeCommand 1,2
End Sub
Sub CloseButton_onClick()
Window.ExeCommand 1,3
End Sub
Sub ColorButton_onClick()
Window.ExeCommand 4,7
End Sub
Sub QQPushMsg_onClick()
QQPushMsg.Visible = false
bMsgInside = 0
window.RebuildRGN
Window.ExeCommand 10,0
End Sub
'六个Bar按钮
Sub Window_onClick(code, Name)
Window.LockPaint()
Window.DisableBar CStr(Name)
Window.ExeCommand code,CStr(Name)
Window.UnLockPaint()
End Sub
'顶部的按钮组
Sub StatusButton_onClick()
s = CStr(StatusButton.Left + StatusButton.width - 10)&"."&CStr(StatusButton.Top + StatusButton.height - 8)
Window.ExeCommand 6,s
End Sub
sub StatusPic_onMouseMove(nX,nY)
s = CStr(StatusPic.Left) & "." & CStr(StatusPic.Top) & "." & CStr(StatusPic.width) & "." & CStr(StatusPic.height)
Window.ExeCommand 20,s
end Sub
sub StatusPic_onMouseLeave()
s = CStr(StatusPic.Left) & "." & CStr(StatusPic.Top) & "." & CStr(StatusPic.width) & "." & CStr(StatusPic.height)
Window.ExeCommand 21,s
end Sub
Sub StatusPic_onClick()
Window.ExeCommand 60,2
End Sub
sub PayButton_onClick()
Window.ExeCommand 4,8
end Sub
Sub MailButton_onClick()
Window.ExeCommand 7,1
End Sub
Sub HostingButton_onClick()
Window.ExeCommand 15,1
End Sub
'下面的按钮组
Sub MobileMsgButton_onClick()
Window.ExeCommand 4,2
End Sub
Sub GameButton_onClick()
Window.ExeCommand 4,5
End Sub
Sub TTButton_onClick()
Window.ExeCommand 4,4
End Sub
Sub ChatRoomButton_onClick()
Window.ExeCommand 4,1
End Sub
Sub MenuButton_onClick()
s = CStr(MenuButton.Left)&"."&CStr(MenuButton.Top)
Window.ExeCommand 5,s
End Sub
Sub MsgManagerButton_onClick()
Window.ExeCommand 4,6
End Sub
Sub SearchButton_onClick()
Window.ExeCommand 4,3
End Sub
Sub QZoneButton_onClick()
Window.ExeCommand 16,1
End Sub
Sub ScrollUpButton_OnClick()
Window.ExeCommand 17,1
End Sub
Sub ScrollDownButton_OnClick()
Window.ExeCommand 18,1
End Sub
sub petOpenButton_onClick()
Window.ExeCommand 40,12
end Sub
Sub petCloseButton_onClick()
Window.ExeCommand 40,13
End Sub
'处理QQ程序发来的事件
Sub Window_OnNotify(code ,var)
If code = 1 Then
'设置当前的Uin
UserNum = var
If 0 = ShowStatus Then
QQNumber.value = UserNum
Else
QQNumber.value = UserNum + UserStatus
End If
ElseIf code = 2 Then
'闪系统消息按钮 var 为1是开始闪。为2是停止
If(var = 1) Then
MsgManagerButton.StopFlash
MsgManagerButton.Flash 30
Else
MsgManagerButton.StopFlash
End If
ElseIf code = 3 then
'闪状态按钮 var 为0,1,2,3是对应的ico。为4表示停止
if var = 0 then
StatusPic.ico = "Online.ico"
elseif var = 1 Then
StatusPic.ico = "leave.ico"
elseif var = 2 Then
StatusPic.ico = "invisible.ico"
elseif var = 3 Then
StatusPic.ico = "Offline.ico"
elseif var = 4 then
StatusPic.Ico = StatusIco
end if
ElseIf code = 4 Then
'设置那个Bar在最前
Window_onClick 2,Var
ElseIf code = 5 Then
'设置当前的状态。
if var = 10 Then
UserStatus = "(在线)"
StatusIco = "StatusPic.ico"
elseif var = 20 Then
UserStatus = "(离线)"
StatusIco = "StatusPic1.ico"
elseif var = 30 Then
UserStatus = "(离开)"
StatusIco = "StatusPic2.ico"
elseif var = 40 Then
UserStatus = "(隐身)"
StatusIco = "StatusPic3.ico"
end If
StatusPic.ico = StatusIco
If 0 = ShowStatus Then
QQNumber.value = UserNum
Else
QQNumber.value = UserNum + UserStatus
End If
ElseIf code = 6 Then
'设置Skin的起始路径
Path = Var
ElseIf code = 100 Then
'改变QQMail的提示
strQQMailTip = "(" + CStr(var) + ")"
MailButton.label = strQQMailTip
ElseIf code = 101 Then
HostingButton.label = "(" + CStr(var) + ")"
ElseIf code = 10 then
if(var = 1) then
PayButton.SetLighting(true)
else
PayButton.SetLighting(false)
end If
ElseIf code = 25 Then
' 皮肤推送
if(var = 1) then
ColorButton.SetLighting(true)
else
ColorButton.SetLighting(false)
end If
ElseIf code = 30 then
If IsObject(MusicPlayer) = TRUE Then
If(var = 1) then
MusicPlayer.bInside = TRUE
Else
MusicPlayer.bInside = FALSE
End If
End If
ElseIf code = 31 then
If IsObject(MainSearchDlg) = TRUE Then
If(var = 1) then
MainSearchDlg.bInside = TRUE
Else
MainSearchDlg.bInside = FALSE
End If
End If
ElseIf code = 40 then
If IsObject(petOpenButton) = TRUE AND IsObject(petCloseButton) = TRUE Then
if var = 12 then
petCloseButton.visible = false
petOpenButton.visible = true
else
petCloseButton.visible = true
petOpenButton.visible = false
end If
End If
ElseIf code = 200 then
QQPushMsg.value = Var
QQPushMsg.Visible = true
bMsgInside = 1
window.RebuildRGN
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -