home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp2.mweb.co.za
/
ftp2.mweb.co.za.tar
/
ftp2.mweb.co.za
/
bin
/
qq
/
QQ.exe
/
VBScript.vbs
< prev
next >
Wrap
Text File
|
2004-05-07
|
10KB
|
416 lines
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
ContentBar.disabled = False
StatusIcon = "Offline.ico"
UseStatus = "Offline"
Path = "skins\\Sanook! QQ\\"
UseNum = "0"
strQQMailTip = "0·âδÊÕ"
showbar = true
end sub
sub Window_OnSize(cx,cy)
Window.LockPaint()
BG.width = cx -49
BG.Height = cy
title.width = cx
BGline.height = cy - 3
BGlinewhite.height = cy - 5
if showbar = True then
BarBtns.visible = True
Tencent.visible = True
BarFrame.left = BarBtns.left + BarBtns.width
QQMain.left =44
else
BarBtns.visible = False
Tencent.visible = False
BarFrame.left = 28
QQMain.left = 30
end if
BGleft.height=cy
BGright.height=cy
BGright.left=cx-24
QQBG.left = QQ.width
QQBG.width = cx - QQ.width - TitleBtns1.width
TitleR1.left = cx - TitleR1.width - 24
TitleBtns1.left = TitleR1.left
'QQ1.left = cx - TitleBtns1.width - QQ1.width
sysbottom.top = cy - 3
sysbottom1.top = sysbottom.top
sysbottom1.left = cx - 27
sysbottom2.top = cy - 1
sysbottom2.width = cx - 52
DisableBarBtn1.left = BarBtns.left
DisableBarBtn1.top = cy - 26
DisableBarBtn2.left = BarBtns.left +2
DisableBarBtn2.top = cy - 22
Tencent.top = cy - 234
flower.top=cy-233
flower1.left=cx-24
'±ß¿ò
BarFrame.top = title.height + 3
BarFrame.width = cx - 3 - BarFrame.left -25
BarFrame.height = cy - bottomheight - BarFrame.top - 6
CellBG.width = BarFrame.width - 3
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 - 4
CellRightcorner.left = Celltopcorner.left
CellRightcorner.top = BarFrame.height - 6
Cellleftcorner.top = BarFrame.height - 6
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
'µÚÒ»ÅÅ°´Å¥
BtnBG1_Left.top = BarFrame.top + BarFrame.height - 1
BtnBG1_Left.left = BarFrame.left
BtnBG1_Middle.top = BtnBG1_Left.top
BtnBG1_Middle.width = BarFrame.width - 48
BtnBG1_Middle.left = BtnBG1_Left.left + 19
BtnBG1_Right.top = BtnBG1_Left.top
BtnBG1_Right.left = cx - 57
ChatBtn.top = BtnBG1_Middle.top +4
ChatBtn.Left = BtnBG1_left.Left +2
PhoneBtn.top = ChatBtn.top - 2
PhoneBtn.Left = ChatBtn.Left + ChatBtn.width
searchBtn.Top = ChatBtn.top - 2
searchBtn.Left = PhoneBtn.Left + PhoneBtn.width
searchBtn.width = BtnBG1_Middle.width - (searchBtn.Left - BtnBG1_Middle.Left) + 43
'µÚ¶þÅÅ°´Å¥
BtnBG2_Left.top = BtnBG1_Left.top + 22
BtnBG2_Left.left = BarFrame.left
BtnBG2_Middle.top = BtnBG2_Left.top
BtnBG2_Middle.width = BtnBG1_Middle.width
BtnBG2_Middle.left = BtnBG2_Left.left + 19
BtnBG2_Right.top = BtnBG2_Left.top
BtnBG2_Right.left = cx - 57
TeBtn.top = BtnBG2_Middle.top +3
TeBtn.Left = BtnBG2_left.Left+2
GameBtn.top = TeBtn.top-1
GameBtn.left = TeBtn.Left + TeBtn.width
SysMsgBtn.top = TeBtn.top -1
SysMsgBtn.Left = GameBtn.Left + GameBtn.width+1
SysMsgBtn.width = BtnBG2_Middle.width - (SysMsgBtn.Left - BtnBG2_Middle.Left) + 43
'µÚÈýÅÅ°´Å¥
QQMain.top = BtnBG2_Left.top + 22
QQMain.left = DisableBarBtn1.left + DisableBarBtn1.width + 6
BtnBG3_Left.Left = QQMain.left + QQMain.Width + 2
BtnBG3_Left.top = BtnBG2_Left.top + 22
BtnBG3_Right.top = BtnBG3_Left.top
BtnBG3_Right.left = cx - 42
BtnBG3_Middle.top = BtnBG3_Left.top
BtnBG3_Middle.Left = BtnBG3_Left.Left + 11
BtnBG3_Middle.width = BtnBG3_Right.left - BtnBG3_Left.Left - BtnBG3_Left.width
StatusBtn.left = BtnBG3_Left.Left + 8
StatusBtn.top = BtnBG3_Right.top + 1
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
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
ContentBar.disabled = False
Window.ExeCommand 2,3
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
ContentBar.disabled = False
Window.ExeCommand 2,1
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
ContentBar.disabled = True
Window.ExeCommand 2,2
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
flower.visible="false"
flower1.visible="false"
tencent.visible="false"
BGlinewhite.visible="false"
DisableBarBtn1.visible = False
DisableBarBtn2.visible = True
TitleR1.visible = true
TitleBtns1.visible = true
Celltopcorner1.left =28
Window.minWidth = 104
Window.width = Window.width - 10
StatusBtn.left = QQMain.left +QQMain.width + 5
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
flower.visible="true"
flower1.visible="true"
tencent.visible="true"
BGlinewhite.visible="true"
DisableBarBtn1.visible = True
DisableBarBtn2.visible = False
TitleR1.visible = True
TitleBtns1.visible = True
cx = Window.width
Celltopcorner1.left =55
Window.minWidth = 161
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
MobileBar_onClick()
elseif var = 2 then
ContentBar_onClick()
elseif var = 3 then
TencentServerBar_onClick()
end if
elseif code = 5 then
'ÉèÖõ±Ç°µÄ״̬¡£
if var = 10 Then
UseStatus = "Online"
StatusIcon = "Online.ico"
elseif var = 20 Then
UseStatus = "Offline"
StatusIcon = "Offline.ico"
elseif var = 30 Then
UseStatus = "N/A"
StatusIcon = "na.ico"
elseif var = 40 Then
UseStatus = "Invisible"
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