⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vbscript.vbs

📁 不力的问题
💻 VBS
字号:
Dim BottomHeight
Dim CornerHeight
Dim UseNum
Dim UseStatus
Dim StatusIcon
Dim showbar
Dim Path
Dim strQQMailTip
BottomHeight = 61

'注释

sub Window_OnInit()
	FriendBar.disabled = True
	TencentServerBar.disabled = False
   	MobileBar.disabled = False
    	BQQBar.disabled = False
    	ContentBar.disabled = False
        Celltopcorner1.visible = False
	StatusIcon = "Offline.ico"
	UseStatus = "离线"
	Path = "skins\\QQ2003\\"
	UseNum = "0"
	strQQMailTip = "0封未收"
	showbar = true
end sub

sub Window_OnSize(cx,cy)
	
	Window.LockPaint()
	BG.width = cx -2
	BG.Height = cy	
	title.width = cx
        BGline.height = cy - 5

	if showbar = True then
		BarBtns.visible = True
		Tencent.visible = True
		BarFrame.left = BarBtns.left + BarBtns.width - 1
		QQMain.left =44
	else
		BarBtns.visible = False
		Tencent.visible = False
		BarFrame.left = 4
		QQMain.left = 30
	end if
        
    QQBG.left = QQ.width
    QQBG.width = cx - QQ.width - TitleBtns1.width - QQ1.width
        
	TitleR1.left = cx - TitleR1.width
	TitleBtns1.left = TitleR1.left


    QQ1.left = cx - TitleBtns1.width - QQ1.width

        sysbottom.top = cy - 5
        sysbottom1.top = sysbottom.top
        sysbottom1.left = cx - 6
        sysbottom2.top = cy - 1
        sysbottom2.width = cx - 10	
	
	DisableBarBtn1.left = BarBtns.left - 1
	DisableBarBtn1.top = cy - 23
	DisableBarBtn2.left = BarBtns.left +2
	DisableBarBtn2.top = cy - 21

    Tencent.top = cy - 193

	'边框
	
	BarFrame.top = title.height + 3
	BarFrame.width = cx - 3 - BarFrame.left 
	BarFrame.height = cy - bottomheight - BarFrame.top - 3

        CellBG.width = BarFrame.width - 4
        CellBG.height = BarFrame.height - 2
        CellRight.left = BarFrame.width - 2
        CellRight.height = CellBG.height
        Cellleft.height = CellBG.height
	
	'QQBall.left = BarFrame.width - 22
	Celltopcorner.left = BarFrame.width - 5
	CellRightcorner.left = Celltopcorner.left
	CellRightcorner.top = BarFrame.height - 7
	Cellleftcorner.top = BarFrame.height - 7	

	MyQQStatus.value = ""	'UseStatus 	 
	MyQQNum.value = UseNum
	'MyQQNum.width = BarFrame.width - 9
	
	QQMailTip.label = strQQMailTip
	If 60 > StatusBtn.width Then
		StatusBtn.Label = ""
	Else
		StatusBtn.Label = UseStatus
	End If

	'MaxWidth = BarFrame.width - 9
	'offset = MyQQNum.width - MaxWidth

	'if offset>0 then
		'MyQQNum.width = MyQQNum.width - offset		
	'end if

	Bar1.width = BarFrame.width - 6
	Bar1.height = BarFrame.height - 37 
	Bar2.width = Bar1.width
	Bar2.height = Bar1.height
	Bar3.width = Bar1.width
	Bar3.height = Bar1.height
	Bar4.width = Bar1.width
	Bar4.height = Bar1.height
	Bar5.width = Bar1.width
	Bar5.height = Bar1.height
	

	'第一排按钮
        BtnBG1_Left.top = BarFrame.top + BarFrame.height 
        BtnBG1_Left.left = BarFrame.left
	BtnBG1_Middle.top = BtnBG1_Left.top
	BtnBG1_Middle.width = BarFrame.width - 6
        BtnBG1_Middle.left = BtnBG1_Left.left + 3
	BtnBG1_Right.top = BtnBG1_Left.top 
	BtnBG1_Right.left = cx - 6

	ChatBtn.top =  BtnBG1_Middle.top +1
	ChatBtn.Left =  BtnBG1_Middle.Left
	PhoneBtn.top = ChatBtn.top
	PhoneBtn.Left = ChatBtn.Left +  ChatBtn.width + 1
	searchBtn.Top = ChatBtn.top 
	searchBtn.Left = PhoneBtn.Left + PhoneBtn.width + 1
	searchBtn.width = BtnBG1_Middle.width - (searchBtn.Left - BtnBG1_Middle.Left) + 18

	'第二排按钮
	BtnBG2_Left.top = BtnBG1_Left.top + 21
        BtnBG2_Left.left = BarFrame.left
	BtnBG2_Middle.top = BtnBG2_Left.top
	BtnBG2_Middle.width = BtnBG1_Middle.width
        BtnBG2_Middle.left = BtnBG2_Left.left + 3
	BtnBG2_Right.top = BtnBG2_Left.top
	BtnBG2_Right.left = cx - 6
	 
	TeBtn.top =  BtnBG2_Middle.top +1
	TeBtn.Left =  BtnBG2_Middle.Left
	GameBtn.top = TeBtn.top
	GameBtn.left = TeBtn.Left +  TeBtn.width + 1
	SysMsgBtn.top = TeBtn.top
	SysMsgBtn.Left = GameBtn.Left + GameBtn.width + 2
	SysMsgBtn.width = BtnBG2_Middle.width - (SysMsgBtn.Left - BtnBG2_Middle.Left) + 18

	'第三排按钮
	QQMain.top = BtnBG2_Left.top + 20

	BtnBG3_Left.Left = QQMain.left + QQMain.Width + 1
	BtnBG3_Left.top = BtnBG2_Left.top + 21
	BtnBG3_Right.top = BtnBG3_Left.top
	BtnBG3_Right.left = cx - 6
	BtnBG3_Middle.top = BtnBG3_Left.top
	BtnBG3_Middle.Left = BtnBG3_Left.Left + 3
	BtnBG3_Middle.width = BtnBG3_Right.left - BtnBG3_Left.Left - BtnBG3_Left.width
	StatusBtn.top = BtnBG3_Right.top + 1
	StatusBtn.left = BtnBG3_Left.Left + 2
	StatusBtn.width = BtnBG3_Middle.width +12
	
	If 60 > StatusBtn.width Then
		StatusBtn.Label = ""
	Else
		StatusBtn.Label = UseStatus
	End If

	Window.UnLockPaint()
	 
end sub

'上面的三个按钮

sub min1_onClick()
	Window.ExeCommand 1,2
end sub

sub close1_onClick()
	Window.ExeCommand 1,3
end sub

sub min2_onClick()
	Window.ExeCommand 1,2
end sub

sub close2_onClick()
	Window.ExeCommand 1,3
end sub

'四个Bar按钮
sub FriendBar_onClick()
	Window.LockPaint
	'CornerHeight = 43
	'corner.top = BarBtns.Top + CornerHeight
	FriendBar.disabled = True
    	TencentServerBar.disabled = False
    	MobileBar.disabled = False
    	BQQBar.disabled = False
    	ContentBar.disabled = False
	Window.ExeCommand 2,0
	Window.UnLockPaint()
end sub

sub TencentServerBar_onClick()
	Window.LockPaint
	'CornerHeight = 43*2
	'corner.top = BarBtns.Top + CornerHeight
	FriendBar.disabled = False
    	TencentServerBar.disabled = True
    	MobileBar.disabled = False
    	BQQBar.disabled = False
    	ContentBar.disabled = False
	Window.ExeCommand 2,1
	Window.UnLockPaint()
end sub

sub MobileBar_onClick()
	Window.LockPaint
	'CornerHeight = 43*3
	'corner.top = BarBtns.Top + CornerHeight
	FriendBar.disabled = False
    	TencentServerBar.disabled = False
    	MobileBar.disabled = True
    	BQQBar.disabled = False
    	ContentBar.disabled = False
	Window.ExeCommand 2,2
	Window.UnLockPaint()
end sub

sub BQQBar_onClick()
	Window.LockPaint
	'CornerHeight = 43*4
	'corner.top = BarBtns.Top + CornerHeight
	FriendBar.disabled = False
    	TencentServerBar.disabled = False
    	MobileBar.disabled = False
    	BQQBar.disabled = True
    	ContentBar.disabled = False
	Window.ExeCommand 2,3
	Window.UnLockPaint()
end Sub

sub ContentBar_onClick()
	Window.LockPaint
	'CornerHeight = 43*4
	'corner.top = BarBtns.Top + CornerHeight
	FriendBar.disabled = False
    	TencentServerBar.disabled = False
    	MobileBar.disabled = False
    	BQQBar.disabled = False
    	ContentBar.disabled = True
	Window.ExeCommand 2,4
	Window.UnLockPaint()
end sub

'上面的那个球球
sub QQBall_onClick()
	Window.ExeCommand 3,1
end sub

'下面的按钮组 
sub ChatBtn_onClick()
	Window.ExeCommand 4,1
end sub

sub PhoneBtn_onClick()
	Window.ExeCommand 4,2
end sub

sub searchBtn_onClick()
	Window.ExeCommand 4,3
end sub

sub TeBtn_onClick()
	Window.ExeCommand 4,4
end sub

sub GameBtn_onClick()
	Window.ExeCommand 4,5
end sub

sub SysMsgBtn_onClick()
	Window.ExeCommand 4,6
end sub

sub QQMain_onClick()
	s = CStr(QQMain.Left)&"."&CStr(QQMain.Top)
	Window.ExeCommand 5,s
end sub

sub StatusBtn_onClick()
	s = CStr(StatusBtn.Left)&"."&CStr(StatusBtn.Top)
	Window.ExeCommand 6,s
end Sub

Sub QQMailTip_onClick()
	Window.ExeCommand 7,1	
End Sub

sub DisableBarBtn1_onClick()

	Window.LockPaint()
	showbar = False
	QQ.image = Path&"qq2003_1.bmp"
	QQ.width = 45

    DisableBarBtn1.visible = False
	DisableBarBtn2.visible = True
	TitleR1.visible = true
	TitleBtns1.visible = true
        Celltopcorner1.visible = true

	Window.minWidth = 104
	Window.width = Window.width - 10
	Window.UnLockPaint()
end sub

sub DisableBarBtn2_onClick()
	Window.LockPaint()
	showbar = True
	QQ.image = Path&"qq2003.bmp"
	QQ.width = 54
	QQ1.image = Path&"2003.bmp"
	QQ1.width = 18
    DisableBarBtn1.visible = True
	DisableBarBtn2.visible = False
	TitleR1.visible = True
	TitleBtns1.visible = True

	cx = Window.width
        Celltopcorner1.visible = False
	Window.minWidth = 114
	Window.width = cx + 10
	Window.UnLockPaint()
end Sub

'处理QQ程序发来的事件
Sub Window_OnNotify(code ,var)
	if code = 1 then
		'设置当前的Uin
		UseNum = var
		MyQQNum.value = UseNum
		'MyQQNum.width = BarFrame.width - 9

		'MaxWidth = BarFrame.width - 9
		'offset = MyQQNum.width - MaxWidth

		'if offset>0 then
			'MyQQNum.width = MyQQNum.width - offset		
		'end if	
	elseif code = 2 then
		'闪系统消息按钮 var 为1是开始闪。为2是停止
		if(var = 1) then
			SysMsgBtn.StopFlash
			SysMsgBtn.Flash 30
		else
			SysMsgBtn.StopFlash
		end if
	elseif code = 3 then
		'闪状态按钮 var 为0,1,2,3是对应的ico。为4表示停止
		if var = 0 then
			StatusBtn.ico = "Online.ico"
		elseif var = 1 then
			StatusBtn.ico = "na.ico"
		elseif var = 2 then
			StatusBtn.ico = "invisible.ico"
		elseif var = 3 then
			StatusBtn.ico = "Offline.ico"
		elseif var = 4 then
			StatusBtn.ico = StatusIcon
		end if
	elseif code = 4 then
		'设置那个Bar在最前
		if var = 0 then
			FriendBar_onClick()
		elseif var = 1 then
			TencentServerBar_onClick()
		elseif var = 2 then
			MobileBar_onClick()
		elseif var = 3 then
			BQQBar_onClick()
		elseif var = 4 then
			ContentBar_onClick()	
		end if
	elseif code = 5 then
		'设置当前的状态。
		if var = 10 Then			
			UseStatus = "在线"
			StatusIcon = "Online.ico"
		elseif var = 20 Then			
			UseStatus = "离线"
			StatusIcon = "Offline.ico"
		elseif var = 30 Then			
			UseStatus = "离开"
			StatusIcon = "na.ico"
		elseif var = 40 Then			
			UseStatus = "隐身"
			StatusIcon = "invisible.ico"			
		end if
		StatusBtn.ico = StatusIcon		
		If 60 > StatusBtn.width Then
			StatusBtn.Label = ""
		Else
			StatusBtn.Label = UseStatus
		End If
		'MyQQStatus.value = UseStatus 
	elseif code  = 6 then
		'设置Skin的起始路径
		Path = Var
	ElseIf code = 7 Then
		'改变QQMail的提示,没有邮件
		strQQMailTip = Var
		QQMailTip.label = strQQMailTip				
	ElseIf code = 8 Then
		'改变QQMail的提示,有新邮件
		strQQMailTip = Var
		QQMailTip.label = strQQMailTip		
	end if
end sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -