Python pyautogui.scroll() Examples

The following are 7 code examples of pyautogui.scroll(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module pyautogui , or try the search function .
Example #1
Source File: mouse.py    From iris with Mozilla Public License 2.0 7 votes vote down vote up
def scroll(clicks):
    """Performs a scroll of the mouse scroll wheel.
    :param clicks: The amount of scrolling to perform.
    :return: None.
    """
    pyautogui.scroll(clicks) 
Example #2
Source File: mouse.py    From iris with Mozilla Public License 2.0 5 votes vote down vote up
def scroll_right(dx: int = None, iterations: int = 1):
    """Scroll right mouse event."""
    Mouse().scroll(abs(dx), 0, iterations) 
Example #3
Source File: test_pyautogui.py    From pyautogui with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def test_scroll(self):
        # TODO - currently this just checks that scrolling doesn't result in an error.
        pyautogui.scroll(1)
        pyautogui.scroll(-1)
        pyautogui.hscroll(1)
        pyautogui.hscroll(-1)
        pyautogui.vscroll(1)
        pyautogui.vscroll(-1) 
Example #4
Source File: mouse.py    From iris with Mozilla Public License 2.0 4 votes vote down vote up
def scroll_down(dy: int = None, iterations: int = 1):
    """Scroll down mouse event."""
    Mouse().scroll(0, -abs(dy), iterations) 
Example #5
Source File: mouse.py    From iris with Mozilla Public License 2.0 4 votes vote down vote up
def scroll_up(dy: int = None, iterations: int = 1):
    """Scroll up mouse event."""
    Mouse().scroll(0, abs(dy), iterations) 
Example #6
Source File: tools.py    From Dindo-Bot with MIT License 4 votes vote down vote up
def scroll_to(value, x=None, y=None, interval=None):
	if interval is not None:
		time.sleep(interval)
	pyautogui.scroll(value, x, y)

# Create directory(s) if not exist 
Example #7
Source File: mouse.py    From iris with Mozilla Public License 2.0 3 votes vote down vote up
def scroll_left(dx: int = None, iterations: int = 1):
    """Scroll left mouse event."""
    Mouse().scroll(-abs(dx), 0, iterations)