[Chennaipy] Chennaipy - Monday Module - 20 Mar 2023

selvi dct selvi.dct at gmail.com
Mon Mar 20 14:23:27 EDT 2023


Date: 20 Mar 2023


Module : PyAutoGUI


Installation : pip install PyAutoGUI


About:

PyAutoGUI is a cross-platform GUI automation Python module for human
beings. Used to programmatically control the mouse & keyboard, also can use
it to take screenshots.


Sample:

    import pyautogui


    currentMouseX, currentMouseY = pyautogui.position() # Returns two
integers, the x and y of the mouse cursor's current position.

    print(currentMouseX, currentMouseY)


    im1 = pyautogui.screenshot() # Saves the screenshot of the current
screen

    im1.save('my_screenshot.png')

    im2 = pyautogui.screenshot('my_screenshot2.png')


Output:

699 699




Reference:

https://pypi.org/project/PyAutoGUI/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/chennaipy/attachments/20230320/8760bfcf/attachment.html>


More information about the Chennaipy mailing list