SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: MSN messenger link
-
Jul 1, 2001, 10:51 #1
MSN messenger link
On several boards, you have a little icq flower, and when you click on that flower, you can send people an icq message with this link: http://www.icq.com/13354654#pager .
Is that possible with MSN messenger?
-
Jul 4, 2001, 18:40 #2
- Join Date
- Jan 2000
- Location
- Charlotte, NC
- Posts
- 5,891
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Nope, unfortunately. This feature hasn't been implemented by MSN.
-
Jul 4, 2001, 20:25 #3
- Join Date
- Jul 1999
- Location
- SC, USA
- Posts
- 390
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hey,
I know a friend (Jason Karl Davis...AKA- jkd) that has used some JavaScript to do this. He found it/deciphered it from the MSN website, I think. Anyway, I'd ask this question over at the www.wsabstract.com forums, where he moderates, and someone (if not him) should answer. Try the request a script forum as he moderates that one.
aDogModerator at www.javascriptcity.com/forums/
-
Jul 5, 2001, 20:20 #4
- Join Date
- Mar 2001
- Location
- northern Maine
- Posts
- 52
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Man, don't I just get around.
With an ActiveX object, you can gain access to the buddy list, and control the program, including logging in, adding buddies, and sending instant messages.
Take a look here:
www.jkd.f2s.com/contact.html
This is my huge "Contact Me" script, which utilizes webpage integration features from ICQ, AIM, MSN, and even Yahoo (Yahoo really doesn't count though, it merely opens new windows).
To maintain XHTML compatibility, I write out the <object> tags at the very bottom, and I utilize them throughout the script itself.
Here is my entire script, save this as contact.js:
Code:/* This script copyright © 2000-2001 By Jason Davis Contact Creator: www.jkd.f2s.com/contact.html */ function imInterface() { //EDIT THIS VARIABLE var imagePath='/images/'; //You're all done, no more editing required :-) var msninfo=false; function msnNotOk() { if (navigator.appName.indexOf("Microsoft")==-1 || !MsgrObj || MsgrObj.LocalState!=2) return true; } function contactUser(a,b) { b=b.toLowerCase().charAt(0); if (b=="a") { var aiminfo='<form action="aim:goim" name="aim" method="get"><input type="hidden" name="screenname" value="'+a+'" /></form>' if (document.layers) { with (document.imfeatures.document) { open(); write(aiminfo); close(); forms.aim.submit(); } } else if (document.all) document.all.imfeatures.innerHTML=aiminfo; else if (document.getElementById) { var theRange=document.createRange(); theRange.selectNodeContents(document.getElementById('imfeatures')); theRange.deleteContents(); var theFragment=theRange.createContextualFragment(aiminfo); document.getElementById('imfeatures').appendChild(theFragment); } document.forms.aim.submit(); } if (b=="i") window.location.href="http://wwp.icq.com/scripts/contact.dll?msgto="+a; if (b=="y") window.open("http://edit.yahoo.com/config/send_webmesg?.target="+a+"&.src=pg"); if (b=="m" && !msnNotOk()) { for (i=0;i<MsgrObj.List(0).Count;i++) { if (MsgrObj.List(0).Item(i).EmailAddress==a) { MsgrApp.LaunchIMUI(MsgrObj.List(0).Item(i)); return; } } MsgrApp.LaunchAddContactUI(a) } if (b=="o") window.open("http://jsprod.odigo.com/share/servlets/genSendPanel?userId="+a+"&aut=-22119-1024104-7364-72-6177112-5594115-125-7&pId=odigo&design=2&tool=companel&charset=0","tour","scrollbars=no,outerwidth=410,width=385,outerheight=270,height=240"); } function addBuddy(a,b) { b=b.toLowerCase().charAt(0); if (b=="a") { var aiminfo='<form action="aim:addbuddy" name="buddy" method="get"><input type="hidden" name="screenname" value="'+a+'" /></form>' if (document.layers) { with (document.imfeatures.document) { open(); write(aiminfo); close(); forms.buddy.submit(); } } else if (document.all) document.all.imfeatures.innerHTML=aiminfo; else if (document.getElementById) { var theRange=document.createRange(); theRange.selectNodeContents(document.getElementById('imfeatures')); theRange.deleteContents(); var theFragment=theRange.createContextualFragment(aiminfo); document.getElementById('imfeatures').appendChild(theFragment); } document.forms.buddy.submit(); } if (b=="i") window.location.href="http://public.icq.com/public/panels/respondpanel/links/add.html?"+a; if (b=="y") window.open("http://edit.yahoo.com/config/add_buddy?.bdl="+a+"&.src"); if (b=="m" && !msnNotOk()) MsgrApp.LaunchAddContactUI(a); } function onlineQuery(a,b) { b=b.toLowerCase().charAt(0); if (b=="i") window.location.href="http://wwp.icq.com/scripts/online.dll?icq="+a+"&img=2"; if (b=="a") alert("Sorry, but AIM does not support this feature."); if (b=="y") window.open("http://opi.yahoo.com/online?u="+a+"&m=g&t=2","","scrollbars=no,toolbar=no,directories=no,resizable=no,status=no,menubar=no,width=150,height=25"); if (b=="m" && !msnNotOk()) { for (i=0;i<MsgrObj.List(0).Count;i++) { if (MsgrObj.List(0).Item(i).EmailAddress==a) { if (MsgrObj.List(0).Item(i).state==2) msninfo='<img src="'+imagePath+'msn1.gif" width="16" height="16" /><font face="Arial" size="2"> Online</font>'; else msninfo='<img src="'+imagePath+'msn0.gif" width="16" height="16" /><font face="Arial" size="2"> Offline</font>'; } } if (msninfo) { var msnWindow=window.open("","","scrollbars=no,toolbar=no,directories=no,resizable=no,status=no,menubar=no,width=75,height=25"); msnWindow.document.write(msninfo); } else { alert("MSN doesn\'t allow communication with users not on your list.\nWait a moment and the specified user will be added to your Contact List automatically."); MsgrApp.LaunchAddContactUI(a) } } } function getBuddies(a,b) { a=a.toLowerCase().charAt(0); b=b.toLowerCase(); if (a=="m" && !msnNotOk()) { var onlineUsers=new Array(); var offlineUsers=new Array(); for (i=0;i<MsgrObj.List(0).Count;i++) { var online=(MsgrObj.List(0).Item(i).state==2)?1:0; switch (online) { case 1: onlineUsers[onlineUsers.length]="MsgrObj.List(0).Item("+i+")"; break; case 0: offlineUsers[offlineUsers.length]="MsgrObj.List(0).Item("+i+")"; break; } } switch (b) { case "online": for (x=0;x<onlineUsers.length;x++) { document.write('<a href="#" onmouseover="window.status=\'Instant Message: '+eval(onlineUsers[x]).FriendlyName+', '+eval(onlineUsers[x]).EmailAddress+'\';return true" onmouseout="window.status=\'\'" onclick="MsgrApp.LaunchIMUI('+onlineUsers[x]+')" class="buddyList"><img src="'+imagePath+'msn1.gif" width="16" height="16" border="0" />'+eval(onlineUsers[x]).FriendlyName+'</a><br />') } break; case "offline": for (y=0;y<offlineUsers.length;y++) { document.write('<span class="buddyList"><img src="'+imagePath+'msn0.gif" width="16" height="16" border="0" />'+eval(offlineUsers[y]).FriendlyName+'</span><br />') } break; case "all": for (x=0;x<onlineUsers.length;x++) { document.write('<a href="#" onmouseover="window.status=\'Instant Message: '+eval(onlineUsers[x]).FriendlyName+', '+eval(onlineUsers[x]).EmailAddress+'\';return true" onmouseout="window.status=\'\'" onclick="MsgrApp.LaunchIMUI('+onlineUsers[x]+')" class="buddyList"><img src="'+imagePath+'msn1.gif" width="16" height="16" border="0" />'+eval(onlineUsers[x]).FriendlyName+'</a><br />') } for (y=0;y<offlineUsers.length;y++) { document.write('<span class="buddyList"><img src="'+imagePath+'msn0.gif" width="16" height="16" border="0" />'+eval(offlineUsers[y]).FriendlyName+'</span><br />') } break; } } if (a=="y") { alert("Sorry, still working on it. :-D") } } this.contact=contactUser; this.add=addBuddy; this.online=onlineQuery; this.list=getBuddies; } var im=new imInterface(); document.write('<div id="imfeatures" style="visibility:hidden;position:absolute;left:0;top:0"></div><object classid="clsid:F3A614DC-ABE0-11d2-A441-00C04F795683" codeType="application/x-oleobject" height="0" id="MsgrObj" width="0"></object><object classid="clsid:FB7199AB-79BF-11d2-8D94-0000F875C541" codeType="application/x-oleobject" height="0" id="MsgrApp" width="0"></object>');
<script src="contact.js" type="text/javascript"></script>
Ignore the image variable near the top, unless you plan on doing online queries, in which case tell me, and I'll set you up with 2 images.
And for the links:
<a href="javascript:im.contact('jasonkarldavis@icqmail.com','msn')">MSN Me</a>
I believe that should do it, it has been a while since I've dug up that script...
-
Jul 6, 2001, 02:40 #5
Thank you!
Bookmarks