Summary for myself Updated from time to time
** I just need to know myself, so the terms may be wrong in some places **
!! View
#command
#Argument option description
import pyautogui as auto
#Mouse movement
auto.moveTo(x,y)
#x coordinate,Move to y coordinate
#click
auto.click()
#If you pass the coordinates as an argument, click there
#right click
auto.rightClick()
#If you pass the coordinates as an argument, right click there
#scroll
auto.scroll()
#Get the center position of the image
auto.locateCenterOnScreen()
#Image as an argument
grayscale=True #Recognize images in grayscale
#Get the presence or absence of an image (used at that time)
l = auto.locateOnScreen()
#Center the return value of locateOnScreen
auto.Center(l)
#Hold down the key
auto.keyDown()
#Release the key
auto.keyUp()
#Press the key
auto.press()
#Press multiple keys
auto.hotkey()
#Character input
auto.typeWrite() #I don't use it much because it often doesn't work for some reason.
#Characters to type in arguments
#Character input alternative
pyperclip.copy()
auto.hotkey('ctrl','v')
Recommended Posts