Python - Office Communicator APIs - is it possible to send messages despite restrictions

I got confused in several Office programs using win32com in Python.

Excel was useful, and Outlook was simple to meet my basic needs for use.

I have Microsoft Lync and I have problems using it.

I know that there are limitations, but I would like to do this; send a message, detect received messages and reply.

I used the code below to open a new window:

import win32com.client msg = win32com.client.Dispatch('Communicator.UIAutomation') msg.InstantMessage(' me@me.com ') 

This works great to open a message box, but any way to send a message usually raises a "Not implemented" error. I know that the api is limited, but I was wondering if it is possible to send a message this way or detect received messages, or is there any other way to communicate with Communicator?

I really don't want to use the SendKeys method to write a message. Any help would be appreciated.

+4
source share
1 answer

Instead of trying to control the Communicator GUI program, you may need to implement an interface to the basic chat protocol.

Your device can speak XMPP - just like Google Talk, Facebook Chat, etc.

From Wikipedia:

In addition, several enterprise software products that do not primarily use XMPP include gateways for XMPP, including:

  • IBM Lotus Sametime
  • Microsoft Lync Server (formerly called Microsoft Office Communications Server - OCS)

You should be able to implement your own XMPP client. libpurple , the chat protocol library for Pidgin , implements XMPP; You can use this if you want.

+5
source

Source: https://habr.com/ru/post/1412345/


All Articles