Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 05-02-2005, 09:01 PM   #1 (permalink)
In The Zone
 
Join Date: Aug 2004
Location: ..:::In Beautiful Hearts:::....
Posts: 339
Default .VBS for msn status on web page


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">[img]msn_login.gif[/img]</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">


[img]msn_buttons.gif[/img]</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
// http://kickme.to/thelink
// Wim

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



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

</html>
vijaythefool is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 05-02-2005, 09:31 PM   #2 (permalink)
In The Zone
 
Join Date: Aug 2004
Location: ..:::In Beautiful Hearts:::....
Posts: 339
Default

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 ....
vijaythefool is offline  
Old 09-02-2005, 12:41 PM   #3 (permalink)
In The Zone
 
Join Date: Aug 2004
Location: ..:::In Beautiful Hearts:::....
Posts: 339
Default

Well any one ,
vijaythefool is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Tenida
- by Charan
- by abhidev
- by Sujeet
- by Sarath

Advertisement




All times are GMT +5.5. The time now is 09:46 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2