Documentation Index
Fetch the complete documentation index at: https://base.bangwu.me/llms.txt
Use this file to discover all available pages before exploring further.
Introduction to PyAutoGUI
PyAutoGUI is a pure-PythonGUI automation library. It lets a program control the mouse and keyboard automatically, so it is very useful for simple automation and UI testing. You can think of it as a Python version of a desktop macro tool.
Mouse operations
Coordinates
For a library that focuses on precise clicking, coordinate handling is the foundation.pyautogui uses screen pixels for positioning. For example, on a display with a resolution of 2560x1600:
2560 1600.
The coordinate origin is in the top-left corner. The x-axis is horizontal and the y-axis is vertical:
Once you understand that, you can position the mouse precisely.
