2

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

2
  • 2
    Sure it's possible. Do you have any prior experience in Python? Commented Nov 12, 2010 at 11:22
  • 1
    I think you'll be better off with batch or powershell scripting. Commented Nov 12, 2010 at 11:23

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Given the baseline provided by the twisted.words library (see my answer), I think python is actually quite a good environment for implementing something like this.
@fmark: Indeed, twisted rocks (as does Python). I suggested that a Microsoft language may be considered (particularly if Python expertise is an issue and time-to-market is a concern).
1

OCS

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.

MSN/Live, AIM, ICQ, and IRC

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.