Jump to content

Recommended Posts

Posted

I have a function that checks my status in communicator:

Func _statusIM()
    $oCommunicator = ObjCreate("Communicator.UIAutomation")
    $statusIM = $oCommunicator.MyStatus
    msgbox(0,"Status",$$statusIM); 1 = offline, 2 = beschikbaar, 10 = bezet en niet storen, 14 = ben zo terug, 34 = afwezig
EndFunc

My question now is: How can i check the status of my co-worker??

  • Moderators
Posted (edited)

Hi, waardd. I've migrated to Lync 2010 now, so don't have the Communicator stuff to play around with anymore, but if I remember correctly the call needs to be made to "communicator.OnContactStatusChange". A search of the MSDN documentation might present you with a method for using it.

http://msdn.microsoft.com/en-us/library/bb758774(v=office.12).aspx

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

  • 2 weeks later...
  • 2 weeks later...
Posted (edited)

Try this:

#include <GUIConstants.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>

_statusIM()

While 1

Wend


Func _statusIM()
$oCommunicator = ObjCreate("Communicator.UIAutomation")
$m = $oCommunicator.GetContact("example@email.com", $oCommunicator.MyServiceID)
$statusName = _GetStatusName($m.Status())
msgbox(0,"",$statusName)
EndFunc

func _GetStatusName($var)
Switch $var
  Case 0
   return "UNKNOWN"
  Case 1
   return "OFFLINE"
  Case 2
   return "ONLINE"
  Case 10
   return "BUSY"
  Case 18
   return "INACTIVE"
  Case 34
   return "AWAY"
EndSwitch

EndFunc

I assume there are more statuses that can be returned, but there are all I had in my communicator and managed to check.

Edited by Furek86
  • 1 month later...
  • 2 years later...
Posted

Try this:

#include <GUIConstants.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>

_statusIM()

While 1

Wend


Func _statusIM()
$oCommunicator = ObjCreate("Communicator.UIAutomation")
$m = $oCommunicator.GetContact("example@email.com", $oCommunicator.MyServiceID)
$statusName = _GetStatusName($m.Status())
msgbox(0,"",$statusName)
EndFunc

func _GetStatusName($var)
Switch $var
  Case 0
   return "UNKNOWN"
  Case 1
   return "OFFLINE"
  Case 2
   return "ONLINE"
  Case 10
   return "BUSY"
  Case 18
   return "INACTIVE"
  Case 34
   return "AWAY"
EndSwitch

EndFunc

I assume there are more statuses that can be returned, but there are all I had in my communicator and managed to check.

 

 

Where did you get the info for the _GetStatusName function?

was that from here? http://msdn.microsoft.com/en-us/library/bb787207(v=office.12).aspx

Or did you check somewhere locally? 

I'm trying to check locally if possible 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...