Dim UserNumDim PathDim ShowStatusDim foldbottomDim bMsgInsideDim CurrentWidthDim CurrentHeight'注释Sub Window_OnInit() Window.GetScriptVersion "1.0" Path = "NewSkins\\QQ2005 Lite\\"ShowStatus = 1UserNum = "0"If 1 = ShowStatus Then UserNum = UserNumEnd IfNewPanels.visible = falsebMsginside = 0End SubSub Window_OnSize(cx,cy)Window.LockPaint()CurrentWidth = cxCurrentHeight = cyBackgroundT.width = cx - 78BackgroundRT.left = cx - 14 BackgroundLB.top = cy - 110BackgroundB.top = cy - 110 BackgroundB.width = cx - 24 BackgroundRB.left = cx - 12 BackgroundRB.top = cy - 110 BackgroundL.height = cy - 195BackgroundC.width = cx - 19 BackgroundC.height = cy - 195 BackgroundR.left = cx - 8 BackgroundR.height = cy - 195foldbottom = 65ntopdistance = 0If bMsgInside = 1 Then ntopdistance = 20End IfNewPanels.top = 68 + ntopdistanceBar1.top = 70 + ntopdistanceBar1.width = cx - 10 Bar1.height = cy - 97CloseButton.left = cx - 21 ColorButton.left = cx - 38 MinButton.left = cx - 55 MenuButton.top = cy - 23PaymentButton.top = cy - 23QQHomeButton.top = cy - 23MsgManagerButton.top = cy - 23 QQNumber.width = cx - 45 Window.UnLockPaint() End Sub'上面的三个按钮Sub MinButton_onClick()Window.ExeCommand 1,2End SubSub CloseButton_onClick()Window.ExeCommand 1,3End SubSub ColorButton_onClick()Window.ExeCommand 4,7End SubSub QQPushMsg_onClick()QQPushMsg.Visible = falsebMsgInside = 0window.RebuildRGNWindow.ExeCommand 10,0End 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,sEnd Subsub StatusPic_onMouseMove(nX,nY)s = CStr(StatusPic.Left) & "." & CStr(StatusPic.Top) & "." & CStr(StatusPic.width) & "." & CStr(StatusPic.height)Window.ExeCommand 20,send Subsub StatusPic_onMouseLeave()s = CStr(StatusPic.Left) & "." & CStr(StatusPic.Top) & "." & CStr(StatusPic.width) & "." & CStr(StatusPic.height)Window.ExeCommand 21,send SubSub StatusPic_onClick()Window.ExeCommand 60,2End SubSub ContentsButton_onClick()Window.ExeCommand 4,9End SubSub MobileMsgButton_onClick()Window.ExeCommand 4,2End SubSub ChatRoomButton_onClick()Window.ExeCommand 4,1End SubSub SearchButton_onClick()Window.ExeCommand 4,3End Sub'下面的按钮组 Sub MenuButton_onClick()s = CStr(MenuButton.Left)&"."&CStr(MenuButton.Top)Window.ExeCommand 5,sEnd Subsub PaymentButton_onClick()Window.ExeCommand 4,8end SubSub QQHomeButton_onClick()Window.ExeCommand 16,1 End SubSub MsgManagerButton_onClick()Window.ExeCommand 4,6End 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 End If ElseIf code = 2 Then '闪系统消息按钮 var 为1是开始闪。为2是停止 If(var = 1) Then MsgManagerButton.StopFlash MsgManagerButton.Flash 30 Else MsgManagerButton.StopFlash End IfElseIf 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 ifElseIf code = 4 Then '设置那个Bar在最前 Window_onClick 2,VarElseIf code = 5 Then '设置当前的状态。 if var = 10 Then StatusIco = "StatusPic.ico" elseif var = 20 Then StatusIco = "StatusPic1.ico" elseif var = 30 Then StatusIco = "StatusPic2.ico" elseif var = 40 Then StatusIco = "StatusPic3.ico" end If StatusPic.ico = StatusIco If 0 = ShowStatus Then QQNumber.value = UserNum Else QQNumber.value = UserNum End IfElseIf code = 6 Then '设置Skin的起始路径 Path = VarElseIf code = 10 then if(var = 1) then PaymentButton.SetLighting(true) else PaymentButton.SetLighting(false) end IfElseIf code = 25 Then ' 皮肤推送 if(var = 1) then ColorButton.SetLighting(true) else ColorButton.SetLighting(false) end IfElseIf code = 200 then QQPushMsg.value = Var QQPushMsg.Visible = true bMsgInside = 1 window.RebuildRGNEnd If End Sub |