Metadata-Version: 2.4
Name: baihe-autogui-inspect
Version: 0.1.4
Summary: A Windows GUI inspection companion for baihe-autogui with Win7-aware PySide6 support
Project-URL: Homepage, https://github.com/jiangbaihe/baihe-autogui-inspect
Project-URL: Repository, https://github.com/jiangbaihe/baihe-autogui-inspect
Project-URL: Issues, https://github.com/jiangbaihe/baihe-autogui-inspect/issues
Project-URL: Changelog, https://github.com/jiangbaihe/baihe-autogui-inspect/blob/main/CHANGELOG.md
Author-email: jiangbaihe <baiheqiuhan@qq.com>
Keywords: automation,gui,inspect,pywinauto,windows
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Requires-Dist: baihe-autogui>=0.1.15
Requires-Dist: pyside6<7,>=6.1.3; python_version >= '3.9'
Requires-Dist: pyside6==6.1.3; python_version == '3.8'
Description-Content-Type: text/markdown

# baihe-autogui-inspect

`baihe-autogui-inspect` is a Windows GUI inspection companion for `baihe-autogui`. It helps you inspect desktop controls, browse UI trees, view element properties, and locate targets before writing automation scripts.

This project is based on the earlier `pyside6-inspect` work originally developed by **Dmitry Vodopyanov** and **Alexander Smirnov**. It is now packaged as a Baihe ecosystem tool and depends on `baihe-autogui`.

## Features

- Browse the UI tree of running Windows applications
- Switch between `uia`, `win32`, and `atspi` backends
- Inspect properties of the selected element
- Pick an element directly from the desktop
- Highlight the selected or hovered element on screen
- Show timing information for inspection operations
- Write logs to both the console and a rotating log file

## Requirements

- Windows
- Python >=3.8
- `uv` or `pip`

For Windows 7 compatibility, Python 3.8 environments are pinned to `PySide6==6.1.3`, which is the last PySide6 line this project treats as Win7-safe. Python 3.9 and newer resolve to a newer compatible `PySide6` automatically.

## Installation

Recommended for end users:

```bash
pip install "baihe-autogui[inspect]"
```

Or install the inspect tool directly:

```bash
pip install baihe-autogui-inspect
```

`baihe-autogui[extra]` remains available as a compatibility alias for the same extension set.

For local development:

```bash
uv sync
```

Or:

```bash
pip install -e .
```

## Run

```bash
baihe-inspect
```

Or:

```bash
python -m baihe_autogui_inspect
```

## Logging

By default, the app writes `baihe_autogui_inspect.log` in the current working directory.

Optional environment variables:

- `BAIHE_AUTOGUI_INSPECT_LOG_LEVEL`
- `BAIHE_AUTOGUI_INSPECT_LOG_FILE`

Example:

```powershell
$env:BAIHE_AUTOGUI_INSPECT_LOG_LEVEL = "INFO"
$env:BAIHE_AUTOGUI_INSPECT_LOG_FILE = "logs\\inspect.log"
baihe-inspect
```

## Development

Run tests:

```bash
python -m pytest -q
```

Run lint and type checks:

```bash
python -m ruff check src tests
python -m mypy src tests
```

## Changelog

Release notes are tracked in [CHANGELOG.md](CHANGELOG.md).
