Jump to content

Check status co-worker in communicator 2007


waardd
 Share

Recommended Posts

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??

Link to comment
Share on other sites

  • Moderators

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!

Link to comment
Share on other sites

  • 2 weeks later...

I searched the site but i really can't tell what to do.

Al i want is a field where i can display the communicator status of a co-worker... I keep reading 2 options:

1- not scriptable

2- scriptable in VB C+ or others...

I cant rewrite option 2 for autoit... who can help me?

For instance on the MSDN page read the example:

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

Link to comment
Share on other sites

  • 2 weeks later...

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
Link to comment
Share on other sites

  • 1 month later...
  • 2 years later...

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 

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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