My pyautogui (python)

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

What is pyautogui used for?

When making RPA. PC autopilot

Module loading

import pyautogui as auto

Frequent operation

Mouse operation
#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()
Image recognition
#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)
Keyboard operation
#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

My pyautogui (python)
My Numpy (Python)
My sys (python)
My pyproj (python)
My str (python)
My PySide (Python)
My shutil (python)
My matplotlib (python)
My urllib (python)
My pyperclip (python)
My sklearn (python)
[My memo] python
My ConfigParser (Python)
My Webdriver (Python)
My arcpy (python)
My win32gui (Python)
My os (python)
My python environment memo
My Beautiful Soup (Python)
[My memo] python -v / python -V
Python Tips (my memo)
My python data analysis container
Python
Aim python library master (51) pyautogui
My python data analytics environment
I made my own Python library
[Python] My stock price forecast [HFT]
My favorite boto3 (Python) API sample
Python My Number verification module released
kafka python
Python basics ⑤
python + lottery 6
Built-in python
Python comprehension
Python technique
Studying python
Python 2.7 Countdown
Python memorandum
Python FlowFishMaster
Python service
python function ①
Python basics
Python memo
ufo-> python (3)
Python comprehension
install python
Python Singleton
Python basics ④
Python Memorandum 2
python memo
Python Jinja2
Python increment
atCoder 173 Python
[Python] function
Python installation
python tips
Installing Python 3.4.3.
Try python
Python memo
Python iterative
Python algorithm