Skip to main content

autojs python version

Project description

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

  1. 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")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autojs_py-0.1.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autojs_py-0.1.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file autojs_py-0.1.1.tar.gz.

File metadata

  • Download URL: autojs_py-0.1.1.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Windows/11

File hashes

Hashes for autojs_py-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cb8772313266a53798850ae6dfe34b9d30b3bebc5b2414c899e76d69ade85c95
MD5 13941a8031175dda4fc7e87212a7c593
BLAKE2b-256 a0ff8292c0896dc50bf610569e5e38150eb116502805262c3264146a7451d444

See more details on using hashes here.

File details

Details for the file autojs_py-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: autojs_py-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Windows/11

File hashes

Hashes for autojs_py-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 82844ba68f56a7ed540a1f80ecfd8d27cc873c4ec6e8f154d1f2c45091fa8adc
MD5 7d4506dc72149b792e18d0b83f428045
BLAKE2b-256 59cc23458f5f16200fed0f1f5c66027d5a7778febef1935cf9a54376b90780d6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page