waardd Posted February 23, 2012 Share Posted February 23, 2012 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 More sharing options...
Moderators JLogan3o13 Posted February 23, 2012 Moderators Share Posted February 23, 2012 (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 February 23, 2012 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 More sharing options...
waardd Posted March 7, 2012 Author Share Posted March 7, 2012 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 scriptable2- 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 More sharing options...
Furek86 Posted March 20, 2012 Share Posted March 20, 2012 (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 March 20, 2012 by Furek86 Link to comment Share on other sites More sharing options...
waardd Posted May 8, 2012 Author Share Posted May 8, 2012 Tnx Furek86. This really helped me out Link to comment Share on other sites More sharing options...
jgq85 Posted July 9, 2014 Share Posted July 9, 2014 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now