Vynk – A Jython desktop automation library

written by cryzed, on May 18, 2010 8:05:00 PM.

I finally started something worthwile: Vynk, a desktop automation library for Jython. Why Jython you ask? Well for one, it’s Python – just implemented on top of the JVM. Additionally the Java standard libraries already come with java.awt.Robot which makes all the coding a hell of a lot easier since most of it is already done. That’s why Vynk is actually only a really thin wrapper around java.awt.Robot trying to make it all a bit more “pythonic” and organized.

Currently the Vynk-package only consists of four files: __init__.py, keyboard.py, mouse.py and screen.py. __init__.py is currently empty and the other files contain the functionality you would probably expect based on their names. Currently only the module for handling the mouse is “pythonic” – if you want to call it that. The module handling the screen implements the methods exposed by the java.awt.Robot class for now but returns complex java class instances – I’ll probably dumb that down quite a bit. Same goes for the module that handles the keyboard, but the main functionality, pressing and releasing keys, isn’t even implemented yet – so that will have to wait for now.

If you are interested in contributing something to the project you can visit my Bitbucket account and send me some patches if you feel like it – or make a pull request. Also if something is extremely wrong with my code don’t hesitate to tell me please – as mentioned here I don’t consider myself very proficient in Python and neither should you.

The ultimate goal is to have a Jython library which feels “pythonic” and ultimatively exposes the same functionality as the java.awt.Robot class. Similiar projects include, although Windows-only, AutoIt and AutoHotKey.

Leave a Reply