AutoJS Python Project
Overview
This project provides a set of Python functions to automate GUI interactions using pyautogui and perform OCR (Optical Character Recognition) using pytesseract.
Project Structure
autojs_python_project/
├── .gitignore
├── README.md
├── pyproject.toml
├── poetry.lock
├── src/
│ └── autojs_py/
│ ├── __init__.py
│ ├── opearation.py
│ ├── ocr.py
│ └── ...
├── tests/
│ ├── __init__.py
│ ├── test_opearation.py
│ └── ...
└── docs/
└── ...
Installation
- Install Tesseract OCR
-
Windows: Download the installer from Tesseract at UB Mannheim and follow the installation instructions.
-
Linux:
sudo apt-get update sudo apt-get install tesseract-ocr
-
macOS:
brew install tesseract
2 Install use pip:
pip install autojs-py
Development
Clone the repository:
git clone https://github.com/angleyanalbedo/your-repo-name.git
cd your-repo-name
Install dependencies using Poetry:
sh poetry install
Usage
GUI Automation
The opearation.py file contains functions to perform various mouse and keyboard actions:
Click(x, y)LClick(x, y)RClick(x, y)DClick(x, y)Send(text)Press(key)LongClick(s)tclick(template)tlclick(template)trcick(template)dclick(template)Swap(pos, pos2)tswap(template, direct)clicktext(text)
OCR
The ocr.py file contains functions to perform OCR on images:
ocr2str(image_path)ocr2box(img)
Example
Here is an example of how to use the clicktext function:
from autojs_py.opearation import clicktext
clicktext("example text")
Metadata
Release files for autojs-py 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| autojs_py-0.1.1.tar.gz | 6.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| autojs_py-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.0 kB
Release files / autojs_py-0.1.1.tar.gz
| Download URL | autojs_py-0.1.1.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb8772313266a53798850ae6dfe34b9d30b3bebc5b2414c899e76d69ade85c95
|
|
BLAKE2b-256 checksum How to use checksums |
a0ff8292c0896dc50bf610569e5e38150eb116502805262c3264146a7451d444
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.7 Windows/11
|
Release files / autojs_py-0.1.1-py3-none-any.whl
| Download URL | autojs_py-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
82844ba68f56a7ed540a1f80ecfd8d27cc873c4ec6e8f154d1f2c45091fa8adc
|
|
BLAKE2b-256 checksum How to use checksums |
59cc23458f5f16200fed0f1f5c66027d5a7778febef1935cf9a54376b90780d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.7 Windows/11
|