當前位置: 首頁>>代碼示例>>Python>>正文


Python pyautogui.scroll方法代碼示例

本文整理匯總了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) 
開發者ID:mozilla,項目名稱:iris,代碼行數:5,代碼來源:mouse.py

示例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) 
開發者ID:mozilla,項目名稱:iris,代碼行數:5,代碼來源:mouse.py

示例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) 
開發者ID:mozilla,項目名稱:iris,代碼行數:5,代碼來源:mouse.py

示例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) 
開發者ID:mozilla,項目名稱:iris,代碼行數:5,代碼來源:mouse.py

示例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) 
開發者ID:mozilla,項目名稱:iris,代碼行數:8,代碼來源:mouse.py

示例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) 
開發者ID:asweigart,項目名稱:pyautogui,代碼行數:10,代碼來源:test_pyautogui.py

示例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 
開發者ID:AXeL-dev,項目名稱:Dindo-Bot,代碼行數:8,代碼來源:tools.py


注:本文中的pyautogui.scroll方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。