Pyautoguiは、コンピュータのマウスとキーボードの操作を自動化するライブラリです。マウスとキーボードを制御するためにGUI自動化テクニックを使って動作します。ここでは、いくつかの例を紹介します：

1.  マウスを動かす

```
pythonCopy codeimport pyautogui

# Move the mouse to the coordinate (100, 100)
pyautogui.moveTo(100, 100)

```

2.  マウスをクリックする

```
pythonCopy codeimport pyautogui

# Move the mouse to (100, 100) and click
pyautogui.click(100, 100)

```

3.  テキストを入力する：

```
pythonCopy codeimport pyautogui

# Type "Hello World!" into the active window
pyautogui.typewrite("Hello World!")

```

4.  スクリーンショット

```
pythonCopy codeimport pyautogui

# Take a screenshot and save it as "screenshot.png"
image = pyautogui.screenshot()
image.save("screenshot.png")

```

注：Pyautoguiは左上の(0, 0)から始まる座標系を使う。
Pyautogui is a library that allows you to automate mouse and keyboard actions on your computer. It works by using a GUI automation technique to control the mouse and keyboard. Here are some examples to get you started:

1.  Moving the mouse:

```
pythonCopy codeimport pyautogui

# Move the mouse to the coordinate (100, 100)
pyautogui.moveTo(100, 100)

```

2.  Clicking the mouse:

```
pythonCopy codeimport pyautogui

# Move the mouse to (100, 100) and click
pyautogui.click(100, 100)

```

3.  Typing text:

```
pythonCopy codeimport pyautogui

# Type "Hello World!" into the active window
pyautogui.typewrite("Hello World!")

```

4.  Screenshot:

```
pythonCopy codeimport pyautogui

# Take a screenshot and save it as "screenshot.png"
image = pyautogui.screenshot()
image.save("screenshot.png")

```

Note: Pyautogui uses the coordinates system, starting from (0, 0) in the top-left corner.