.VBS for msn status on web page

Status
Not open for further replies.

vijaythefool

In the zone
Can some one help me fix this code !
this used to work fine before ! i ve tried this on win 98 and work fine a year back .
Now when i opened this html file it just gave the not signed in image !
now i use xp and new version of messenger .

do some one have similar script to show our presence in web page of msn messenger ?

i ve not involved the images for offline , online bussy etc in this ....














<html>

<head>
<link rel=stylesheet type="text/css" href="styles.css" title="style">
<style type="text/css">
#MSN_Login {visibility:visible; background-color:#D8D6D3; left:16; top:16; width:152; position:absolute}
</style>
<style type="text/css">
#MSN_Online {visibility:visible; background-color:#FFFFCC; left:16; top:16; width:152; position:absolute}
</style>
<style type="text/css">
#MSN_Buttons {visibility:visible; left:111; top:19; position:absolute}
</style>
<title>MSN Messenger Window 1.0</title>
</head>
<body>
<!--[if IE]>
<div id="MSN_Login">
<table border="2" width="100%" cellspacing="0" cellpadding="0"><tr><td>
<p style="margin-top: 2; margin-bottom:


2; margin-left: 2">
</p>
</td></tr></table>
</div>
<Script Language=VBScript id=mcvbs SRC="msn.vbs">
Dim A_
A_=False
Dim B_,C_,D_
B_=False
C_=False
D_=False
Dim E_,F_,G_
E_=False
F_=False
G_=3000
Dim H_(),I_
I_=0
Dim J_,K_,M_,N_,O_,P_,Q_
J_="<OBJECT classid="""&"clsid:FB7199AB-79BF-11d2-8D94-0000F875C541"""&" codeType=application/x-oleobject id=MsgrApp width=0

height=0></OBJECT>"
K_="<font class=""Text"">"
M_="<p style=""margin-top: 2; margin-bottom: 2; margin-left: 2""><img align=absbottom width=16 height=16 border=0 src="
N_=M_&"msn_online.gif"&" ALT="""&"Online"&""">"
O_=M_&"msn_busy.gif"&" ALT="""&"Busy"&""">"
P_=M_&"msn_away.gif"&" ALT="""&"Away"&""">"
Q_=M_&"msn_offline.gif"&" ALT="""&"Offline"&""">"
Sub DrawInitialState
On Error Resume Next
Dim R_
R_=MsgrObj.LocalState
If Err.description<>"" Then
A_=False
Else
A_=True
End If
Err.Clear
If A_=True Then
document.all.getmsgr.style.display="none"
DrawContacts
Else
DrawLogin True
document.all.getmsgr.style.display="block"
End If
End Sub
Sub DrawContacts
Dim V_,W_,X_,Y_
V_="none"
W_="none"
X_="none"
Y_="none"
If E_ Then
mcClearCache
End If
If MsgrObj.LocalState AND 2 Then
If Not F_ Then
mcLoadCache
End If
If I_>0 Then
Dim Z_,ol,nc
Z_=""
ol=0
nc=5
Dim i
i=0
While i<I_ And ol<nc
Dim s
s=H_(i).State
If s AND 2 Then
ol=ol+1
Dim AB_
AB_=fixName(H_(i).FriendlyName,17)
Z_=Z_&"<a>"&getStateImage(s)&"</a>"&"<a "
Z_=Z_&""&""&AB_
Z_=Z_&"""class=mclink>"&K_&AB_
Z_=Z_&"</font></a></p>"
End If
i=i+1
Wend
If ol>0 Then
W_="block"
Else
V_="block"
End If
Y_="block"
document.all.mUser.innerHTML="<table border=""2"" width=""100%"" cellspacing=""0"" cellpadding=""0""><tr><td><table

border=""0"" width=""100%"" bgcolor=""#D8D6D3"" cellspacing=""0"" cellpadding=""2""><tr><td><font

class=""Title""></font><font class=""Title"">MSN Online</font></td></tr></table>"&Z_
Else
V_="block"
End If
End If
document.all.mUser.style.display=W_
document.all.cmore.style.display=Y_
document.all.msgrlogon.style.display=X_
document.all.noneol.style.display=V_
End Sub
Sub mcClearCache
I_=0
Erase H_
F_=False
E_=False
D_=True
End Sub
Sub mcLoadCache
Dim BB_
Set BB_=MsgrObj.List(0)
Dim CB_
CB_=0
Dim DB_
DB_=BB_.Count
Redim H_(DB_)
For Each u In BB_
Set H_(CB_)=u
CB_=CB_+1
Next
I_=CB_
SortUsers 0,I_-1
F_=True
End Sub
Sub SortUsers(EB_,FB_)
Dim GB_
if FB_>EB_ then
GB_=ptn(EB_,FB_)
SortUsers EB_,GB_-1
SortUsers GB_+1,FB_
end if
End Sub
Function ptn(EB_,FB_)
Dim HB_,tmp
Randomize
HB_=Int(Rnd()Mod(FB_-EB_+1))+EB_
Set tmp=H_(HB_)
Set H_(HB_)=H_(EB_)
Set H_(EB_)=tmp
Dim a,b
a=EB_
b=FB_
While b>a
If StrComp(H_(b).FriendlyName,tmp.FriendlyName,1)>=0 Then
b=b-1
Else
Set H_(a)=H_(b)
Set H_(b)=H_(a+1)
Set H_(a+1)=tmp
a=a+1
End If
Wend
ptn=a
End Function
Function htmlesc(str)
str=Replace(str,"&","&amp;")
str=Replace(str,"<","&lt;")
htmlesc=Replace(str,">","&gt;")
End Function
Function fixName(s,max)
If Len(s)>max Then
s=Left(s,max-2)&"..."
End If
fixName=htmlesc(s)
End Function
Function getStateImage(t)
Dim i
If t=2 Then
i=0
ElseIf t=10 Or t=50 Then
i=2
Else
i=1
End If
If i=0 Then
getStateImage=N_
ElseIf i=2 Then
getStateImage=O_
Else
getStateImage=P_
End If
End Function



</Script>
<div id="MSN_Online">
<span id=mUser style="display:none"></span>
</td></tr></table>
</div>
<div id="MSN_Buttons">


</p>
</div>


<OBJECT classid="clsid:F3A614DC-ABE0-11d2-A441-00C04F795683" codebase="#Version=2,0,0,83" codeType=application/x-oleobject

id=MsgrObj width=0 height=0></OBJECT>
<Script FOR=window EVENT=onload Language=VBScript>
// MSN Messenger Window 1.0
// *kickme.to/thelink
// Wim

If Not isDrawn_ Then
isDrawn_=True
DrawInitialState
End If
</Script>
<Script Language="JavaScript">
function Reload() {
setTimeout('javascript:DrawInitialState();Reload();',10*1000); }
Reload()
</Script>



<![endif]-->
</body>

</html>
 
OP
V

vijaythefool

In the zone
what is an object classid ?

<OBJECT classid="""&"clsid:FB7199AB-79BF-11d2-8D94-0000F875C541"""&" codeType=application/x-oleobject id=MsgrApp width=0>
......

see some folders scanned with similar folder names while scaning for viruses ....
 
Status
Not open for further replies.
Top Bottom