📄 vbscript.vbs
字号:
Dim UserNum
Dim UserStatus
Dim StatusIco
Dim Path
Dim strQQMailTip
Dim ShowStatus
Dim foldbottom
Dim bMsgInside
Dim CurrentWidth
Dim CurrentHeight
'注释
Sub Window_OnInit()
Window.GetScriptVersion "1.0"
UserStatus = "(离线)"
Path = "NewSkins\\amoi-2\\"
ShowStatus = 1
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
BackgroundRB.left = cx - 24
BackgroundRB.top = cy - 244
BackgroundLB.top = cy - 244
BackgroundRT.left = cx - 24
BackgroundL.height = cy - 509
BackgroundR.left = cx - 24
BackgroundR.height = cy - 509
BackgroundT.width = cx - 48
BackgroundB.top = cy - 244
BackgroundB.width = cx - 48
BackgroundC.width = cx - 48
BackgroundC.height = cy - 509
If IsObject(NewPanels) = TRUE Then
NewPanels.height = cy - 287
End If
FolderBackgroundRB.left = cx - 35
FolderBackgroundRB.top = cy - 200
FolderBackgroundLB.top = cy - 200
FolderBackgroundRT.left = cx - 35
FolderBackgroundL.height = cy - 292
FolderBackgroundR.left = cx - 35
FolderBackgroundR.height = cy - 292
FolderBackgroundT.width = cx - 71
FolderBackgroundB.top = cy - 200
FolderBackgroundB.width = cx - 71
FolderBackgroundC.width = cx - 71
FolderBackgroundC.height = cy - 292
If IsObject(CloseButton) = TRUE Then
CloseButton.left = cx - 28
End If
If IsObject(MinButton) = TRUE Then
MinButton.left = cx - 55
End If
If IsObject(ColorButton) = TRUE Then
ColorButton.left = cx - 41
End If
If IsObject(NetDiskButton) = TRUE Then
NetDiskButton.top = cy - 104
End If
If IsObject(EaseButton) = TRUE Then
EaseButton.top = cy - 129
End If
If IsObject(CustomButton) = TRUE Then
CustomButton.top = cy - 79
End If
If IsObject(ContentsButton) = TRUE Then
ContentsButton.top = cy - 104
End If
If IsObject(RtxButton) = TRUE Then
RtxButton.top = cy - 54
End If
If IsObject(GameButton1) = TRUE Then
GameButton1.top = cy - 129
End If
If IsObject(MobileButton) = TRUE Then
MobileButton.top = cy - 79
End If
If IsObject(MobileMsgButton) = TRUE Then
MobileMsgButton.top = cy - 189
End If
If IsObject(SBuddyButton) = TRUE Then
SBuddyButton.top = cy - 104
End If
If IsObject(FriendButton) = TRUE Then
FriendButton.top = cy - 129
End If
If IsObject(GameButton) = TRUE Then
GameButton.top = cy - 162
End If
If IsObject(TTButton) = TRUE Then
TTButton.top = cy - 188
End If
If IsObject(ChatRoomButton) = TRUE Then
ChatRoomButton.top = cy - 158
End If
If IsObject(MenuButton) = TRUE Then
MenuButton.top = cy - 173
End If
If IsObject(MsgManagerButton) = TRUE Then
MsgManagerButton.top = cy - 158
End If
If IsObject(SearchButton) = TRUE Then
SearchButton.top = cy - 188
End If
If IsObject(QZoneButton) = TRUE Then
QZoneButton.top = cy - 162
End If
If IsObject(QQNumber) = TRUE Then
QQNumber.width = cx - 154
End If
If IsObject(CustomPicture0) = TRUE Then
CustomPicture0.top = cy - 54
End If
If IsObject(MusicPlayer) = TRUE Then
MusicPlayer.width = cx - 62
MusicPlayer.top = cy - 254
End If
If IsObject(MainSearchDlg) = TRUE Then
MainSearchDlg.width = cx - 66
MainSearchDlg.top = cy - 226
End If
If IsObject(PetOpenButton) = TRUE Then
PetOpenButton.top = cy - 189
End If
If IsObject(Folder) = TRUE Then
Folder.width = cx - 71
Folder.height = cy - 309
End If
If IsObject(FolderBackgroundB) = TRUE Then
nPluginBottom = FolderBackgroundB.top + FolderBackgroundB.height-2
ElseIf IsObject(FolderBackgroundL) = TRUE Then
nPluginBottom = FolderBackgroundL.top + FolderBackgroundL.height-2
ElseIf IsObject(FolderBackground) = TRUE Then
nPluginBottom = FolderBackground.top + FolderBackground.height-2
Else
nPluginBottom = Folder.top + Folder.height-2
End If
If IsObject(MainSearchDlg) = TRUE Then
If MainSearchDlg.bInside = TRUE Then
MainSearchDlg.left = Folder.left-2
MainSearchDlg.height = 30
MainSearchDlg.width = Folder.width+4
MainSearchDlg.top = nPluginBottom - MainSearchDlg.height+2
nPluginBottom = nPluginBottom - MainSearchDlg.height - 1
End If
End If
If IsObject(MusicPlayer) = TRUE Then
If MusicPlayer.bInside = TRUE Then
MusicPlayer.left = Folder.left-2
MusicPlayer.height = 35
MusicPlayer.width = Folder.width+4
MusicPlayer.top = nPluginBottom - MusicPlayer.height+2
nPluginBottom = nPluginBottom - MusicPlayer.height - 1
End If
End If
If bMsgInside = 1 Then
If IsObject(QQPushMsg) = TRUE Then
QQPushMsg.left = 2
QQPushMsg.width = cx - 4
QQPushMsg.height = 18
QQPushMsg.top = nPluginBottom - QQPushMsg.height
nPluginBottom = nPluginBottom - QQPushMsg.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
If IsObject(GameButton1) = TRUE Then
GameButton1.ico = "GameButton.ico"
End If
If IsObject(ContentsButton) = TRUE Then
ContentsButton.ico = "ContentsButton.ico"
End If
If IsObject(MobileButton) = TRUE Then
MobileButton.ico = "MobileButton.ico"
End If
If IsObject(LoveButton) = TRUE Then
LoveButton.ico = "LoveButton.ico"
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 IsObject(QQNumber) = TRUE Then
UserNum = var
If 0 = ShowStatus Then
QQNumber.value = UserNum
Else
QQNumber.value = UserNum + UserStatus
End If
End If
ElseIf code = 2 Then
'闪系统消息按钮 var 为1是开始闪。为2是停止
If IsObject(MsgManagerButton) = TRUE Then
If(var = 1) Then
MsgManagerButton.StopFlash
MsgManagerButton.Flash 30
Else
MsgManagerButton.StopFlash
End If
End If
ElseIf code = 3 then
'闪状态按钮 var 为0,1,2,3是对应的ico。为4表示停止
If IsObject(StatusPic) = TRUE Then
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
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
If IsObject(StatusPic) = TRUE Then
StatusPic.ico = StatusIco
End If
If IsObject(QQNumber) = TRUE Then
If 0 = ShowStatus Then
QQNumber.value = UserNum
Else
QQNumber.value = UserNum + UserStatus
End If
End If
ElseIf code = 6 Then
'设置Skin的起始路径
Path = Var
ElseIf code = 100 Then
'改变QQMail的提示
strQQMailTip = "(" + CStr(var) + ")"
If IsObject(MailButton) = TRUE Then
MailButton.label = strQQMailTip
End If
ElseIf code = 101 Then
If IsObject(HostingButton) = TRUE Then
HostingButton.label = "(" + CStr(var) + ")"
End If
ElseIf code = 10 then
If IsObject(PayButton) = TRUE Then
If(var = 1) Then
PayButton.SetLighting(true)
Else
PayButton.SetLighting(false)
End If
End If
ElseIf code = 25 Then
' 皮肤推送
If IsObject(ColorButton) = TRUE Then
If(var = 1) then
ColorButton.SetLighting(true)
Else
ColorButton.SetLighting(false)
End If
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
If IsObject(QQPushMsg) = TRUE Then
QQPushMsg.value = Var
QQPushMsg.Visible = true
bMsgInside = 1
window.RebuildRGN
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -