Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/asweigart/pyautogui
/ functions
Functions
158 in github.com/asweigart/pyautogui
⨍
Functions
158
◇
Types & classes
20
↓ 18 callers
Function
_logScreenshot
A helper function that creates a screenshot to act as a logging mechanism. When a PyAutoGUI function is called, this function is also called
pyautogui/__init__.py:706
↓ 16 callers
Function
_sendMouseEvent
(ev, x, y, button)
pyautogui/_pyautogui_osx.py:430
↓ 9 callers
Function
_mouseMoveDrag
Handles the actual move or drag event, since different platforms implement them differently. On Windows & Linux, a drag is a normal mouse mov
pyautogui/__init__.py:1417
↓ 9 callers
Function
_normalizeXYArgs
Returns a ``Point`` object based on ``firstArg`` and ``secondArg``, which are the first two arguments passed to several PyAutoGUI functions.
pyautogui/__init__.py:642
↓ 9 callers
Function
click
Performs pressing a mouse button down and then immediately releasing it. Returns ``None``. When no arguments are passed, the primary mouse b
pyautogui/__init__.py:949
↓ 9 callers
Function
failSafeCheck
()
pyautogui/__init__.py:1732
↓ 9 callers
Function
position
Returns the current xy coordinates of the mouse cursor as a two-integer tuple. Args: x (int, None, optional) - If not None, this argum
pyautogui/__init__.py:752
↓ 4 callers
Function
_getNumberToken
Gets the number token at the start of commandStr. Given '5hello' returns '5' Given ' 5hello' returns ' 5' Given '-42hello' returns '-42
pyautogui/__init__.py:1816
↓ 4 callers
Function
_sendMouseEvent
The helper function that actually makes the call to the mouse_event() win32 function. Args: ev (int): The win32 code for the mouse even
pyautogui/_pyautogui_win.py:466
↓ 3 callers
Function
_normalizeButton
The left, middle, and right mouse buttons are button numbers 1, 2, and 3 respectively. This is the numbering that Xlib on Linux uses (while W
pyautogui/__init__.py:825
↓ 3 callers
Function
size
Returns the width and height of the screen as a two-integer tuple. Returns: (width, height) tuple of the screen size, in pixels.
pyautogui/__init__.py:777
↓ 2 callers
Method
__init__
(self, holdKeysArg, pressKeysArg=None)
tests/test_pyautogui.py:645
↓ 2 callers
Function
_click
(x, y, button)
pyautogui/_pyautogui_x11.py:72
↓ 2 callers
Function
_moveTo
(x, y)
pyautogui/_pyautogui_osx.py:446
↓ 2 callers
Function
_moveTo
(x, y)
pyautogui/_pyautogui_x11.py:100
↓ 2 callers
Function
_normalKeyEvent
(key, upDown)
pyautogui/_pyautogui_osx.py:238
↓ 2 callers
Function
_scroll
Send the mouse vertical scroll event to Windows by calling the mouse_event() win32 function. Args: clicks (int): The amount of scrollin
pyautogui/_pyautogui_win.py:507
↓ 2 callers
Function
_size
Returns the width and height of the screen as a two-integer tuple. Returns: (width, height) tuple of the screen size, in pixels.
pyautogui/_pyautogui_win.py:348
↓ 2 callers
Function
_specialKeyEvent
Helper method for special keys. Source: http://stackoverflow.com/questions/11045814/emulate-media-key-press-on-mac
pyautogui/_pyautogui_osx.py:264
↓ 2 callers
Function
locateOnScreen
(*args, **kwargs)
pyautogui/__init__.py:209
↓ 2 callers
Function
mouseDown
Performs pressing a mouse button down (but not up). The x and y parameters detail where the mouse event happens. If None, the current mouse p
pyautogui/__init__.py:883
↓ 2 callers
Function
mouseUp
Performs releasing a mouse button up (but not down beforehand). The x and y parameters detail where the mouse event happens. If None, the cur
pyautogui/__init__.py:916
↓ 2 callers
Function
press
Performs a keyboard key press down, followed by a release. Args: key (str, list): The key to be pressed. The valid names are listed in
pyautogui/__init__.py:1582
↓ 2 callers
Function
scroll
Performs a scroll of the mouse scroll wheel. Whether this is a vertical or horizontal scroll depends on the underlying operating system.
pyautogui/__init__.py:1175
↓ 1 callers
Method
__mul__
(self, other)
tests/test_pyautogui.py:70
↓ 1 callers
Function
_click
(x, y, button)
pyautogui/_pyautogui_osx.py:377
↓ 1 callers
Function
_getCommaToken
Gets the comma token at the start of commandStr. Given ',' returns ',' Given ' ,', returns ' ,' Raises an exception if a comma isn't f
pyautogui/__init__.py:1889
↓ 1 callers
Function
_getParensCommandStrToken
Gets the command string token at the start of commandStr. It will also be enclosed with parentheses. Given "(ccc)world" returns "(ccc)" G
pyautogui/__init__.py:1852
↓ 1 callers
Function
_getQuotedStringToken
Gets the quoted string token at the start of commandStr. The quoted string must use single quotes. Given "'hello'world" returns "'hello'"
pyautogui/__init__.py:1835
↓ 1 callers
Function
_handlePause
A helper function for performing a pause at the end of a PyAutoGUI function based on some settings. If ``_pause`` is ``True``, then sleep fo
pyautogui/__init__.py:631
↓ 1 callers
Function
_mouseDown
(x, y, button)
pyautogui/_pyautogui_x11.py:105
↓ 1 callers
Function
_mouseUp
(x, y, button)
pyautogui/_pyautogui_x11.py:113
↓ 1 callers
Function
_position
Returns the current xy coordinates of the mouse cursor as a two-integer tuple by calling the GetCursorPos() win32 function. Returns: (x
pyautogui/_pyautogui_win.py:335
↓ 1 callers
Function
_runCommandList
(commandList, _ssCount)
pyautogui/__init__.py:2031
↓ 1 callers
Function
_tokenizeCommandStr
Tokenizes commandStr into a list of commands and their arguments for the run() function. Returns the list.
pyautogui/__init__.py:1905
↓ 1 callers
Function
_vscroll
(clicks, x=None, y=None)
pyautogui/_pyautogui_osx.py:315
↓ 1 callers
Function
_vscroll
(clicks, x=None, y=None)
pyautogui/_pyautogui_x11.py:42
↓ 1 callers
Function
displayMousePosition
This function is meant to be run from the command line. It will automatically display the location and RGB of the mouse cursor.
pyautogui/__init__.py:1739
↓ 1 callers
Function
dragTo
Performs a mouse drag (mouse movement while a button is held down) to a point on the screen. The x and y parameters detail where the mouse ev
pyautogui/__init__.py:1325
↓ 1 callers
Function
getInfo
()
pyautogui/__init__.py:2165
↓ 1 callers
Function
getPointOnLine
Returns an (x, y) tuple of the point that has progressed a proportion ``n`` along the line defined by the two ``x1``, ``y1`` and ``x2``, ``y2
pyautogui/__init__.py:605
↓ 1 callers
Function
hotkey
Performs key down presses on the arguments passed in order, then performs key releases in reverse order. The effect is that calling hotkey('c
pyautogui/__init__.py:1694
↓ 1 callers
Function
moveTo
Moves the mouse cursor to a point on the screen. The x and y parameters detail where the mouse event happens. If None, the current mouse posi
pyautogui/__init__.py:1261
↓ 1 callers
Function
onScreen
Returns whether the given xy coordinates are on the primary screen or not. Note that this function doesn't work for secondary screens. Args:
pyautogui/__init__.py:789
↓ 1 callers
Function
sleep
(seconds)
pyautogui/__init__.py:1805
Method
__add__
(self, other)
tests/test_pyautogui.py:64
Method
__eq__
(self, other)
tests/test_pyautogui.py:58
Method
__floordiv__
(self, other)
tests/test_pyautogui.py:76
Method
__init__
(self, msg, interval=0.0)
tests/test_pyautogui.py:624
Method
__init__
(self, keysArg)
tests/test_pyautogui.py:635
Method
__ne__
(self, other)
tests/test_pyautogui.py:61
Method
__neg__
(self)
tests/test_pyautogui.py:82
Method
__pos__
(self)
tests/test_pyautogui.py:85
Method
__repr__
(self)
tests/test_pyautogui.py:55
Method
__rmul__
(self, other)
tests/test_pyautogui.py:73
Method
__str__
(self)
tests/test_pyautogui.py:52
Method
__sub__
(self, other)
tests/test_pyautogui.py:67
Method
__truediv__
(self, other)
tests/test_pyautogui.py:79
Function
_click
Send the mouse click event to Windows by calling the mouse_event() win32 function. Args: button (str): The mouse button, either 'left',
pyautogui/_pyautogui_win.py:432
Function
_couldNotImportPyGetWindow
This function raises PyAutoGUIException. It's used for the PyGetWindow function names if the PyGetWindow module failed to be
pyautogui/__init__.py:297
Function
_couldNotImportPyMsgBox
This function raises ``PyAutoGUIException``. It's used for the PyMsgBox function names if the PyMsgbox module failed to be imported.
pyautogui/__init__.py:150
Function
_couldNotImportPyScreeze
This function raises ``PyAutoGUIException``. It's used for the PyScreeze function names if the PyScreeze module failed to be imported
pyautogui/__init__.py:223
Function
_couldNotImportPyTweening
This function raises ``PyAutoGUIException``. It's used for the PyTweening function names if the PyTweening module failed to be import
pyautogui/__init__.py:105
Function
_dragTo
(x, y, button)
pyautogui/_pyautogui_osx.py:435
Function
_genericPyAutoGUIChecks
A decorator that calls failSafeCheck() before the decorated function and _handlePause() after it.
pyautogui/__init__.py:585
Function
_hscroll
Send the mouse horizontal scroll event to Windows by calling the mouse_event() win32 function. Args: clicks (int): The amount of scroll
pyautogui/_pyautogui_win.py:544
Function
_hscroll
(clicks, x=None, y=None)
pyautogui/_pyautogui_osx.py:334
Function
_hscroll
(clicks, x=None, y=None)
pyautogui/_pyautogui_x11.py:55
Function
_keyDown
Performs a keyboard key press without the release. This will put that key in a held down state. NOTE: For some reason, this does not seem to
pyautogui/_pyautogui_win.py:250
Function
_keyDown
(key)
pyautogui/_pyautogui_osx.py:219
Function
_keyDown
Performs a keyboard key press without the release. This will put that key in a held down state. NOTE: For some reason, this does not seem to
pyautogui/_pyautogui_x11.py:121
Function
_keyUp
Performs a keyboard key release (without the press down beforehand). Args: key (str): The key to be released up. The valid names are listed
pyautogui/_pyautogui_win.py:295
Function
_keyUp
(key)
pyautogui/_pyautogui_osx.py:228
Function
_keyUp
Performs a keyboard key release (without the press down beforehand). Args: key (str): The key to be released up. The valid names are listed
pyautogui/_pyautogui_x11.py:154
Function
_mouseDown
Send the mouse down event to Windows by calling the mouse_event() win32 function. Args: x (int): The x position of the mouse event.
pyautogui/_pyautogui_win.py:375
Function
_mouseDown
(x, y, button)
pyautogui/_pyautogui_osx.py:355
Function
_mouseUp
Send the mouse up event to Windows by calling the mouse_event() win32 function. Args: x (int): The x position of the mouse event.
pyautogui/_pyautogui_win.py:404
Function
_mouseUp
(x, y, button)
pyautogui/_pyautogui_osx.py:366
Function
_mouse_is_swapped
()
pyautogui/_pyautogui_win.py:461
Function
_mouse_is_swapped
()
pyautogui/_pyautogui_osx.py:394
Function
_mouse_is_swapped
()
pyautogui/_pyautogui_x11.py:83
Function
_moveTo
Send the mouse move event to Windows by calling SetCursorPos() win32 function. Args: button (str): The mouse button, either 'left', 'mi
pyautogui/_pyautogui_win.py:357
Function
_multiClick
(x, y, button, num, interval=0.0)
pyautogui/_pyautogui_osx.py:404
Function
_position
()
pyautogui/_pyautogui_osx.py:295
Function
_position
Returns the current xy coordinates of the mouse cursor as a two-integer tuple. Returns: (x, y) tuple of the current xy coordinates of t
pyautogui/_pyautogui_x11.py:26
Function
_scroll
(clicks, x=None, y=None)
pyautogui/_pyautogui_osx.py:305
Function
_scroll
(clicks, x=None, y=None)
pyautogui/_pyautogui_x11.py:68
Function
_size
()
pyautogui/_pyautogui_osx.py:300
Function
_size
()
pyautogui/_pyautogui_x11.py:37
Function
_snapshot
(tag, folder=None, region=None, radius=None)
pyautogui/__init__.py:1779
Function
_vscroll
A wrapper for _scroll(), which does vertical scrolling. Args: clicks (int): The amount of scrolling to do. A positive value is the mouse
pyautogui/_pyautogui_win.py:560
Method
checkForValidCharacters
(self, msg)
tests/test_pyautogui.py:697
Function
countdown
(seconds)
pyautogui/__init__.py:1809
Function
doubleClick
Performs a double click. This is a wrapper function for click('left', x, y, 2, interval). The x and y parameters detail where the mouse even
pyautogui/__init__.py:1090
Function
dragRel
Performs a mouse drag (mouse movement while a button is held down) to a point on the screen, relative to its current position. The x and y pa
pyautogui/__init__.py:1366
Function
hold
Context manager that performs a keyboard key press down upon entry, followed by a release upon exit. Args: key (str, list): The key to
pyautogui/__init__.py:1621
Function
hscroll
Performs an explicitly horizontal scroll of the mouse scroll wheel, if this is supported by the operating system. (Currently just Linux.) The
pyautogui/__init__.py:1205
Function
isShiftCharacter
Returns True if the ``character`` is a keyboard key that would require the shift key to be held down, such as uppercase letters or the symbol
pyautogui/__init__.py:526
Function
isValidKey
Returns a Boolean value if the given key is a valid value to pass to PyAutoGUI's keyboard-related functions for the current platform. This fu
pyautogui/__init__.py:1521
Function
keyDown
Performs a keyboard key press without the release. This will put that key in a held down state. NOTE: For some reason, this does not seem to
pyautogui/__init__.py:1542
next →
1–100 of 158, ranked by callers