Package: pyrobogui
pyroboguiWrapper around pyautogui - plus some new functionsBuild 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 bothUsage:Installationpip install pyroboguiIf you are using MAC or Linux checkout pyautogui documentation on how to install tkinter.Automate the boring stuff bookUsagefrom pyrobogui import robo, pag

# use the robo.method() to do what you need 
# pag - is the pyautogui instance, if you need more barebones featuresMouse functionsrobo.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 imageorx - coodonate numbery - coordonate numberAdditionally you have:offsetUp - make action up from the center specifiedoffsetDown - make action down from the center specifiedoffsetLeft - make action down from the center specifiedoffsetRight - make action down from the center specifiedimageError - raise error when this image is found in screen while waiting for the image neededtimeout - if the seconds specified passes without the image needed to appear then raise errorThese parameters are available for the bellow functions too:rightClickdoubleClickhoverdragToScroll functionsrobo.scrollUp(320)Insert a number for the functions bellow (scroll is noticeable for values over 120)scrollUpscrollDownscrollLeftscrollRightKeyboard functionsrobo.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 specifiedFor a list of key names you can press check pyautogui documentationrobo.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 functionsStart 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 secondsGet coordinates of the image:robo.getImageLocation(image, full_match=False)image - image you need to find on screenfull_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 imageimageNr='last'imageNr='first'imageNr='all' - returns a list of image locationsWait functionsrobo.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 stoptimeout - wait for the image to appear a specific number of seconds if that seconds pass then raise errorrobo.waitImageToAppear(image, imageError=None, timeout=1800, full_match=False)
robo.waitImageToDisappear(image, imageError=None, timeout=1800, full_match=False)image - image you need on screenimageError - stop if this image is foundtimeout - stop if takes too long timefull_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