本文整理汇总了Python中pyautogui.scroll方法的典型用法代码示例。如果您正苦于以下问题:Python pyautogui.scroll方法的具体用法?Python pyautogui.scroll怎么用?Python pyautogui.scroll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyautogui
的用法示例。
在下文中一共展示了pyautogui.scroll方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: scroll_down
# 需要导入模块: import pyautogui [as 别名]
# 或者: from pyautogui import scroll [as 别名]
def scroll_down(dy: int = None, iterations: int = 1):
"""Scroll down mouse event."""
Mouse().scroll(0, -abs(dy), iterations)
示例2: scroll_up
# 需要导入模块: import pyautogui [as 别名]
# 或者: from pyautogui import scroll [as 别名]
def scroll_up(dy: int = None, iterations: int = 1):
"""Scroll up mouse event."""
Mouse().scroll(0, abs(dy), iterations)
示例3: scroll_left
# 需要导入模块: import pyautogui [as 别名]
# 或者: from pyautogui import scroll [as 别名]
def scroll_left(dx: int = None, iterations: int = 1):
"""Scroll left mouse event."""
Mouse().scroll(-abs(dx), 0, iterations)
示例4: scroll_right
# 需要导入模块: import pyautogui [as 别名]
# 或者: from pyautogui import scroll [as 别名]
def scroll_right(dx: int = None, iterations: int = 1):
"""Scroll right mouse event."""
Mouse().scroll(abs(dx), 0, iterations)
示例5: scroll
# 需要导入模块: import pyautogui [as 别名]
# 或者: from pyautogui import scroll [as 别名]
def scroll(clicks):
"""Performs a scroll of the mouse scroll wheel.
:param clicks: The amount of scrolling to perform.
:return: None.
"""
pyautogui.scroll(clicks)
示例6: test_scroll
# 需要导入模块: import pyautogui [as 别名]
# 或者: from pyautogui import scroll [as 别名]
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)
示例7: scroll_to
# 需要导入模块: import pyautogui [as 别名]
# 或者: from pyautogui import scroll [as 别名]
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