Skip to main content

A module used to automate a system easily

Project description

pyautoflow

This library can control your keyboard and mouse to automate everyday tasks. It can take screenshots and screen recordings for you to check back in on later.

Examples

# Import the two base modules
from pyautoflow import controls, inputs


# CONTROLS
# Press the "a" key
controls.press("a")

# Press and hold the "a" key for 5 seconds
controls.press_and_hold("a", 5)

# Type the string "Hello, world!"
controls.type("Hello, world!")

# Set the cursor location to 10, 11
controls.set_cursor(10, 11)

# Set the cursor location to the current location plus 10, 11
controls.set_cursor_rel(10, 11)

# Moves the cursor location to 10, 11 over 5 seconds
controls.move_cursor(10, 11, 5)

# Moves the cursor location to the current location plus 10, 11 over 5 seconds
controls.move_cursor_rel(10, 11, 5)

# Clicks at the current location
controls.click()

# Right clicks at the current location
controls.right_click()

# Presses and holds the left mouse button until released
controls.press_mouse(0)

# Presses and holds the right mouse button until released
controls.press_mouse(1)

# Releases the left mouse button
controls.release_mouse(0)

# Releases the left mouse button
controls.release_mouse(1)

# Drags the cursor from 10, 11 to 100, 101 over 1 second
controls.drag(10, 11, 100, 101, 1)

# Resets timer
reset_timer()

# Gets the time since the last timer reset
delta = get_timer()


# INPUTS
# Takes a screenshot
screen = screenshot()

# Takes a screenshot of the area 10, 11, 100, 101
screen = screenshot_area(10, 11, 100, 101)

# Saves the given image as "foo.png"
save_img(screen, "foobar.png")

# Starts recording the screen as "bar.mp4"
start_recording("bar.mp4")

# Stops the screen recording
stop_recording()

TODO:

  • Text recognition
  • System information
  • Microphone and camera input

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

pyautoflow-1.1.4.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

pyautoflow-1.1.4-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file pyautoflow-1.1.4.tar.gz.

File metadata

  • Download URL: pyautoflow-1.1.4.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for pyautoflow-1.1.4.tar.gz
Algorithm Hash digest
SHA256 d022a1682ab6719656c34bd9d9c9867a6cdf20e291f2f0fe97e6cad25a92bc5f
MD5 30b5c9d28ff3858fc735a75cf583fbab
BLAKE2b-256 f1515e211de7ec7ee42e5c6d569a3695820a31fd239ae5183df80a54b2ecbae0

See more details on using hashes here.

File details

Details for the file pyautoflow-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: pyautoflow-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for pyautoflow-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fbe23d12372b5a79f36e2ae1f01c0ec622fa6f55e1e17602571df00cb57eb7d1
MD5 066ea846f2143feda4873ee810b56faa
BLAKE2b-256 3a237eacd85d50af59db3a0a6bf27230b005c09815758489d953a38dbd01c23d

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