Skip to main content

A simple GUI automation tool to automate your boring tasks

Project description

PyAutoEasy

PyAutoEasy is a extension / wrapper around the famous PyAutoGUI, a cross-platform GUI automation tool to replace your boooring repetitive tasks.

When PyAutoGUI offers powerful ways to control keyboard and mouse movements, PyAutoEasy makes it super easy to grab the cursor positions on the screen and give meaningful names to them and generate the boilerplate program which we can easily modify to suit our needs.

How to install

Thanks to pip! its as simple as :

pip install --upgrade pip
pip install pyautoeasy

Example Usage

Step 1 : Generate initial code after grabbing the required locations in the screen

  1. Open a terminal / command prompt and run
pyautoeasy
  1. Move your cursor to the desired location and press alt+r in the keyboard to record the coordinates of a point in the screen.
  2. This opens up a dialog box, Now give a name to this point and click OK.
  3. Repeat the above 2 steps for all the cursor locations that you want to grab.
  4. Press alt+s to generate your initial automation script. (sample.py)

Step 2 : Modify the generated sample script to suit your needs.

Lets say you wanna create a login automation. Follow step 1 to record all desired locations in the screen like email field, password field, submit button etc. The generated sample program would look something like this.

from pyautoeasy import ScreenPoint

email_field = ScreenPoint(pos=(952, 309))
email_field.click_here()

password_field = ScreenPoint(pos=(934, 438))
password_field.click_here()

submit_button = ScreenPoint(pos=(1127, 597))
submit_button.click_here()

Now you can take above generated file and easily modify it to something like this. Super easy and intuitive!

from pyautoeasy import ScreenPoint

email_field = ScreenPoint(pos=(952, 309))
email_field.click_here()
email_field.type_here("mytestemail@gmail.com")

password_field = ScreenPoint(pos=(934, 438))
password_field.click_here()
password_field.type_here("password@123")

submit_button = ScreenPoint(pos=(1127, 597))
submit_button.click_here()

More about ScreenPoint

  • A ScreenPoint object represents a point in your screen with (x,y) cordinates specified in the pos argument in the constructor.
point1 = ScreenPoint(pos=(34, 78))
  • We can use the ScreenPoint object to move the curser there, click on that point, type something there, right click on that point etc. These operations can be done easily by using the following methods :
point1 = ScreenPoint(pos=(34, 78))
point1.click_here() # click on this point
point1.right_click_here() # right click on this point
point1.cursor_here() # move the cursor to this point
point1.type_here("text to type") # type something after selecting this point.
point1.double_click_here() # double click on this point
point1.triple_click_here() # triple click on this point
  • By default all the operations in ScreenPoint class is done after a delay of `ScreenPoint.Config.delay' (defaults to 1 second). We can change this property gloabally as follows
ScreenPoint.Config.delay = 0.5
  • Alternatively we can even have a delay specified at each operation by passing the argument after_sleeping_for.
point1 = ScreenPoint(pos=(34, 78))
point1.click_here(after_sleeping_for=0.5) # click on this point after a delay of 0.5 seconds
point1.right_click_here(after_sleeping_for=0) # right click on this point after a delay of 0 seconds.
  • type_here() method can take an optional argument enter=True which would press an enter key after typing the text. By default enter=True

Contribute and Make it better

Any form of contribution is welcome. From finding and reporting bugs to giving feedback to suggesting cool features to building out cool features. Check out CONTRIBUTING.md for more details.

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

pyautoeasy-0.0.5.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyautoeasy-0.0.5-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file pyautoeasy-0.0.5.tar.gz.

File metadata

  • Download URL: pyautoeasy-0.0.5.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pyautoeasy-0.0.5.tar.gz
Algorithm Hash digest
SHA256 4eb53476d9d5ea3300e6f1f6fd48fbca89453ff9449dc0dd38dcceea41ff4e88
MD5 e8cff9112062a8366ed2015e3434845e
BLAKE2b-256 0df669ca134844be7def63c8d9088f6f8c90377c38bf6cde3c0d08b981672de7

See more details on using hashes here.

File details

Details for the file pyautoeasy-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: pyautoeasy-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pyautoeasy-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 703ca7bf8d0544dbe9760be71bca4b1a7615cdbf2246634a95fe65087f205d17
MD5 24cce6ef26d7631e692bab59d753e96d
BLAKE2b-256 19e26d3c42ac5bfa7462497e8eacfb37822afd6ec782ce8acf567bbda32c9c0b

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