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?

  • Linux, for now.

  • 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.tar.gz (13.6 kB view details)

Uploaded Source

File details

Details for the file autoit-0.2.tar.gz.

File metadata

  • Download URL: autoit-0.2.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for autoit-0.2.tar.gz
Algorithm Hash digest
SHA256 dae1abcb428d2c446aaa227fc837c890650d27ba11d955b8ecdebe2f5aab8f11
MD5 912ff67a1f99d4fb8bf7cf21c2f7cb14
BLAKE2b-256 e7d113b0809a9fe18f34ac5e8331fe461198d05ff9fb9a670481d0f970ca14dd

See more details on using hashes here.

Supported by

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