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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM