1import pyautogui
2
3pyautogui.click(100, 100)
4pyautogui.moveTo(100, 150)
5pyautogui.moveRel(0, 10) # move mouse 10 pixels down
6pyautogui.dragTo(100, 150)
7pyautogui.dragRel(0, 10) # drag mouse 10 pixels down
1import pyautogui as pg
2clk= pg.locateOnScreen('click.png', confidence=0.9)
3pg.click(x=clk.left+int(clk.width/2), y=clk.top+int(clk.height/2))