Skip to main content

Automate it with Python

Project description

Automate it with Python.

What is this?

This Python 3 package aims to help you automate several GUI actions easily through Python, like clicking, moving the mouse around, using the keyboard, etc.

How to install it?

pip install autoit

External requirements?

  • Windows, or

  • Linux

    • xdotool to do any ait operation.

    • Python’s Xlib to use ait.log (mouse/keyboard logger).

How does it look like?

import ait

# Click wherever the mouse is
ait.click()

# Click with the right mouse button
ait.click('R')

# Click at some position
ait.click(140, 480)

# Click in the center of the screen with the middle button
ait.click(0.5, 0.5, 'M')

# Click 10 pixels below
ait.click(0j, 10j)

# Movement (absolute, percentage and relative) can also be done
ait.move(140, 480)
ait.move(0.5, 0.5)
ait.move(60j, -9j)

# Mouse position can also be retrieved
x, y = ait.mouse()

# Pressing keys can also be done
ait.press('q', '!', '\n')  # Exit vim
ait.press(*'\b' * 10)  # 10 carriage returns

# Writing things with the keyboard too
ait.write('Hello world!\n')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autoit-0.2.4.tar.gz (15.6 kB view hashes)

Uploaded Source

Built Distribution

autoit-0.2.4-py3-none-any.whl (15.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page