pyautogui 자동화 라이브러리
pyautogui document site pyautogui.readthedocs.io/en/latest/
Welcome to PyAutoGUI’s documentation! — PyAutoGUI documentation
Welcome to PyAutoGUI’s documentation! PyAutoGUI lets your Python scripts control the mouse and keyboard to automate interactions with other applications. The API is designed to be as simple. PyAutoGUI works on Windows, macOS, and Linux, and runs on Pytho
pyautogui.readthedocs.io
1. 설치
pip install pyautogui
2. 주요 함수 정리
pyautogui.position() # 현재 마우스의 위치를 가져온다
pyautogui.click(x,y) # 화면 위치 (x,y)를 클릭
pyautogui.locateCenterOnScreen(이미지 파일명) # 이미지 파일의 내용과 일치하는 화면의 좌표를 가져온다
pyautogui.screenshot(저장을 위한 파일명, region(위치x, 위치y, 가로넓이, 세로넓이) # 주어진 좌표와 크기 부분을 캡쳐한다
pyautogui.alert() # 메시지창 출력. 확인 버튼 하나 표시
pyautogui.confirm() # 확인창 출력. 확인/취소 버튼 표시. 여러개의 원하는 숫자만큼의 버튼 표시 되며 변수로 받을 수 있다
pyautogui.prompt() # 글자를 넣을 수 있는 창 표시되고 입력하면 변수로 받을 수 있다 cf. input() 대신 사용 가능
pyautogui.password() # 입력하는 글이 * 표시되어 나타남. 내용은 변수로 받을 수 있다