Search code examples
javascriptwindows-desktop-gadgets

Microsoft Communicator Presence in W7 Gadget


I would like to integrate communicator presence into a W7 Gadget I built, but I can't seem to get it to work. The code below seems to work in IE (if your company has communicator, put your email address in there and it should work).

<html>
  <head>
  <script language="JavaScript">
    var nameCtrl = new ActiveXObject("Name.NameCtrl");
  </script>
  </head>
  <body>
  <span onmouseover="nameCtrl.ShowOOUI('test@example.com',0,this.offsetLeft,this.offsetTop)"onmouseout="nameCtrl.HideOOUI()">
    Hover your mouse over this text to retrieve presence information.
  </span>
  </body>
  </html>

This will not work in a Gadget... and I am trying to find other ways to do this. If I can simply display the correct presence color, then that would be fine. I do not need the options included in the drop down menu, just the persons presence.


Solution

  • I used a different portion of the NameCtrl object to get this task done

    var nameCtrl = new ActiveXObject("Name.NameCtrl");
    var communicatorPresence = nameCtrl.GetStatus('useremail','');