Python模块之pyautogui -模拟按下键盘

作用:

  模拟按下键盘

必要操作:

>>> import pyautogui

帮助查看:

>>> help(pyautogui)
或 单独查看某个方法(函数)
>>> help(pyautogui.hotkey)

方法(函数):

  ## 模拟按下键盘组合键 ctrl+alt+w

>>> pyautogui.hotkey('ctrl', 'alt', 'w')

  ## 模拟按下键盘组合键 ctrl+f

>>> pyautogui.hotkey('ctrl', 'f')

  ## 模拟按下键盘回车键

>>> pyautogui.press('enter')

  ## 操作间隔1.5秒

>>> pyautogui.PAUSE = 1.5

   ## 左鍵点击某个点

>>> pyautogui.click(x=118, y=361, clicks=2, interval=0, button='left')

 

pyautogui
posted @ 2021-11-26 23:04  悟透  阅读(1287)  评论(0编辑  收藏  举报