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 backspaces
# 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.6.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

autoit-0.2.6-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: autoit-0.2.6.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for autoit-0.2.6.tar.gz
Algorithm Hash digest
SHA256 a4c27d1f160ac8d4777f9d39228f5e16eb10daf7e2517c70d561835e154a1d68
MD5 17faebf008fbdc006ed89d3030c505cf
BLAKE2b-256 80f8ad6a91cbeda01619865c96fa3254bbb1db3e1f6b42a6e6c6a415d75bbae0

See more details on using hashes here.

File details

Details for the file autoit-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: autoit-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for autoit-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 29fc0bb71274f5bbe1b5565e926be7d71f270ae850079d83c98d5a13724f31f8
MD5 1cb921c1762fe5d8c4731daa9b30b23f
BLAKE2b-256 e4cb973d4ade351cd9f880c38fec49a71e0957298f834d15aee35998cb928fce

See more details on using hashes here.

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