Jump to content
Sign in to follow this  
waardd

Check status co-worker in communicator 2007

Recommended Posts

waardd

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

Share this post


Link to post
Share on other sites
JLogan3o13

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

√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
waardd

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

Share this post


Link to post
Share on other sites
Furek86

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

Share this post


Link to post
Share on other sites
waardd

Tnx Furek86. This really helped me out ;)

Share this post


Link to post
Share on other sites
jgq85

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 

Share this post


Link to post
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
Sign in to follow this  

×