pyautogui.moveTo(100, 200) # moves mouse to X of 100, Y of 200.
pyautogui.moveRel(0, 50) # move the mouse down 50 pixels.
pyautogui.click() # click the mouse
pyautogui.click(button='right') # right-click the mouse
pyautogui.click(clicks=2) # double-click the left mouse button
pyautogui.doubleClick() # perform a left-button double click
pyautogui.scroll(10) # scroll up 10 "clicks"
2. 键盘相关
pyautogui.press('enter') # press the Enter key
# the hotkey() can be passed several key strings which will be pressed down in order, and then released in reverse order. This code:
pyautogui.hotkey('ctrl', 'v')