在网页调用 WINDOWS 控件两例(2)_Dreamweaver教程
<!--
.small { font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif}
body { font-family: Verdana, Arial, Helvetica, sans-serif}
a { color:#3D55C4 ; text-decoration: none}
a:link { color:#3D55C4 ; text-decoration: none}
a:hover { color:#000000 ; text-decoration: none}
-->
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000" vlink="##3D55C4" onclick="(mUser.innerHTML)">
<table cellpadding="1" cellspacing="1" bgcolor="#3D55C4" width="150" id="abc">
<script language="VBScript" id="mcvbs">
' this script is loosely based on the original script from Microsoft.
' Various flags and such for god-knows what...
Dim A_
A_=False
Dim B_,C_,D_
B_=False
C_=False
D_=False
Dim E_,F_,G_
E_=False
F_=False
G_=3000 ' Ooohhh! I know what this is! This is the amount of milliseconds for refresh
Dim H_(),I_ ' H_() is an object array of users. This is also the cache
I_=0
' Variables for different links to different images representing state in Messenger... I think
Dim J_,K_,L_,M_,N_,O_,P_,OffL
J_="<OBJECT classid="""&"clsid:FB7199AB-79BF-11d2-8D94-0000F875C541"""&" codeType=application/x-oleobject id=MsgrApp width=0 height=0></OBJECT>"
K_="<font class=""small"">"
M_="<img align=absbottom width=16 height=17 border=0 src="
L_="<br><b> <a href=""vbscript:op(-1)"" class=""color""><img src='msn_icons/msn_ppl.gif' border='0' alt=''>"&" Sign in now... "&"</a></b>"
N_=M_&"msn_icons/online1.gif"&" ALT="""&"Online"&""">"
O_=M_&"msn_icons/busy1.gif"&" ALT="""&"Busy"&""">"
P_=M_&"msn_icons/idle1.gif"&" ALT="""&"Away"&""">"
'Added by JH
OffL = M_&"msn_icons/offline1.gif"&" ALT="""&"Offline"&""">"
M_="<img align=absbottom width=16 height=17 border=0 src="
Dim Q_
Q_=False
Dim ttl
ttl=0
' added arrays for online and offline contacts
Dim OnA() ' online contacts
Dim OffA() ' offline contacts
' counters for amount of online and offline
Dim OnCtr
OnCtr=0
Dim OffCtr
OffCtr=0
' Online/Offline?
Sub DrawInitialState
On Error Resume Next
Dim R_
R_=MsgrObj.LocalState
If Err Then
A_=False
Else
A_=True
End If
Err.Clear
If A_=True Then
document.all.getmsgr.style.display="none"
DrawContacts
Else
document.all.getmsgr.style.display="block"
End If
End Sub
Function HasMsgrApp()
appload.innerHTML = J_
On Error Resume Next
Dim R_
Set R_=MsgrApp
If Err.description="" Then
HasMsgrApp=True
Else
HasMsgrApp=False
End If
Err.Clear
End Function
Sub RefreshMC()
If A_ Then
If C_ Then
D_=True
Else
D_=False
DrawContacts
SetRefreshTimer
End If
End If
End Sub
Sub SetRefreshTimer()
If Not C_ Then
C_=True
- 相关链接:
- 教程说明:
Dreamweaver教程-在网页调用 WINDOWS 控件两例(2)。