Skip to main content

pyrobogui Downloads

Wrapper around pyautogui - plus some new functions

Build on top of pyautogui but with some extra features:

  • timeouts,
  • setup,
  • aproximate match of images (install manually opencv and numpy if you need this feature),
  • can be oriented to a screen coordonate automation or screen images automation or both

Usage:

Installation

pip install pyrobogui

If you are using MAC or Linux checkout pyautogui documentation on how to install tkinter.

Automate the boring stuff book

Usage

from pyrobogui import robo, pag

# use the robo.method() to do what you need 
# pag - is the pyautogui instance, if you need more barebones features

Mouse functions


robo.click(image=None, 
        x=None, 
        y=None, 
        offsetUp=None, 
        offsetDown=None, 
        offsetLeft=None, 
        offsetRight=None, 
        imageError=None, 
        timeout=1800, 
        full_match=False)

Describing the parameters:
Put either:
  • image - path to image

or

  • x - coodonate number
  • y - coordonate number

Additionally you have:

  • offsetUp - make action up from the center specified
  • offsetDown - make action down from the center specified
  • offsetLeft - make action down from the center specified
  • offsetRight - make action down from the center specified
  • imageError - raise error when this image is found in screen while waiting for the image needed
  • timeout - if the seconds specified passes without the image needed to appear then raise error

These parameters are available for the bellow functions too:

  • rightClick
  • doubleClick
  • hover
  • dragTo

Scroll functions

robo.scrollUp(320)

Insert a number for the functions bellow (scroll is noticeable for values over 120)
  • scrollUp
  • scrollDown
  • scrollLeft
  • scrollRight

Keyboard functions

robo.write (text, 
            image=None, 
            x=None, 
            y=None, 
            offsetUp=None, 
            offsetDown=None, 
            offsetLeft=None, 
            offsetRight=None, 
            imageError=None, 
            timeout=1800,
            full_match=False)

Where:
  • text - the string to write on the center of the image or the coordinates specified

For a list of key names you can press check pyautogui documentation

robo.press(keys) # Ex: robo.press("ctrl, c")
  • keys - the hotkeys you want to press, you can press max 3 keys (ex: robo.press("ctrl, alt, delete"))

Additional functions

Start setup to get the x,y coordinates and RGB color from the screen Useful when you want to start an automation process based on x,y coodinates(xy positions must be the same each time the process runs!)

robo.setup()

Wait a number of seconds equivalent to > time.sleep(x)

robo.waitSeconds(5) #wait 5 seconds

Get coordinates of the image:

robo.getImageLocation(image, full_match=False)
  • image - image you need to find on screen
  • full_match - by default if will reduce the match if not found on screen down to 70%. If you set it to True it will try to find on screen an identical match size, colors etc.

Get to coordonates for the images needed.
You can count images of the same type on the screen from UP to DOWN, and LEFT to RIGHT.
robo.imageNeddle(image, imageNr='last') 

Useful for casses where you have images that look the same on the screen but they are positioned in different places.

For example let's say the you have a form with a lot of radio buttons and you want to click on the 5th radio button, you will do:

robo.imageNeddle("./img/radio_button.png", 5)

Also you the options for imageNr parameter:

  • imageNr=5 - returns the specified counted image
  • imageNr='last'
  • imageNr='first'
  • imageNr='all' - returns a list of image locations

Wait functions

robo.waitColorToAppear(xyrgb, imageError=None, timeout=1800) #ex:robo.waitColorToAppear("100, 200, 255, 255, 255") 
robo.waitColorToDisappear(xyrgb, imageError=None, timeout=1800)
  • xyrgb - a string like this "100, 200, 255, 255, 255"
  • imageError - if this image apprears on screen the function will stop
  • timeout - wait for the image to appear a specific number of seconds if that seconds pass then raise error
robo.waitImageToAppear(image, imageError=None, timeout=1800, full_match=False)
robo.waitImageToDisappear(image, imageError=None, timeout=1800, full_match=False)
  • image - image you need on screen
  • imageError - stop if this image is found
  • timeout - stop if takes too long time
  • full_match - by default if will aproximate the image on screen by 70% if you change it to True it will match it 100%

full_match - not on all PC's the rgb colors, image size are the same, they may vary a little; that's way full_match is False by default

Metadata

Release files for pyrobogui 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyrobogui 0.0.8
File Size Uploaded Provenance
pyrobogui-0.0.8.tar.gz 6.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pyrobogui 0.0.8
File Interpreter ABI Platform
pyrobogui-0.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 14.4 kB

Release files / pyrobogui-0.0.8.tar.gz

Download URL pyrobogui-0.0.8.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f49a171ee8343e2bc8653dbc840a089f873ac599164352672f7d1f7f59775b16
BLAKE2b-256 checksum
How to use checksums
6982f5daa3366fc58838b5be357406d8b4c548085c9f523fd303895b08099b41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.24.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

Release files / pyrobogui-0.0.8-py3-none-any.whl

Download URL pyrobogui-0.0.8-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8f3eed6019bcbaed014337a70db6372c1e55bd724382b746ad576922b9f01c4
BLAKE2b-256 checksum
How to use checksums
5f363769ce2966de77c09e3331a043ccf2d2a24b07574836f5156b9db6ef93e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.24.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

Security for pyrobogui 0.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page