Reputation: 679
I am new to python scripts .
I have few repetative testing tasks such logging to various IM's
ex (OCS,different public messengers) etc .
Is it possible to automate these tasks using python .
If so from where do I start with ?
Working on windows 2003 server .
I know the basics of python. want to enhance the skills .
Thanks, Tazim
Upvotes: 2
Views: 1558
Reputation: 58567
For OCS, you should be able to use COM scripting to do most but not all[1] things. The code should look a bit like this:
import win32com.client
def get_contact(signin_uri, communicator):
c = communicator.GetContact(signin_uri, communicator.MyServiceId)
return c
comm = win32com.client.Dispatch('Communicator.UIAutomation')
contact = get_contact("[email protected]", comm)
You should be able to translate the documentation from the API fairly easily, especially if you focus on the JScript examples.
For MSN/Live Messenger, the excellent twisted library contains an rudimentary implementation of a multiprotocol IM client (and server). To get started, check out some code samples.
[1] From the documentation:
For reasons of security, not all methods or properties can be called using JavaScript or another scripting language. Such restrictions are documented in Office Communicator Automation API Reference.
Upvotes: 1
Reputation: 141790
Not quite a duplicate question, but the answers to "How can we use ms office communicator client exposed APIs in python, is that possible ?" should prove valuable.
If you are new to Python, you'll want to check out the Python Tutorial.
You may also wish to consider something a bit more Windows-oriented like VBScript or PowerShell, however.
Upvotes: 3