AutoJs6 Documentation

repository·master·Indexed 27 days ago

https://github.com/supermonster003/autojs6

An open-source JavaScript-based automation tool for Android (API level 24+) that leverages Accessibility Services, Root, and Shizuku for UI interactions, image recognition, and system-level tasks. Features include a JavaScript IDE, Selector API, layout analysis, and an upgraded Rhino engine (v2.0.0-SNAPSHOT) supporting modern JS features like BigInt and Template Literals. Includes specialized modules for HTTP requests, image processing, and integration with libraries like Day.js and jieba-analysis.

Tokens
44K
Snippets
56
Records
625
Agent score
87%

What's inside AutoJs6

  1. New features in v6.6.3

    master

    The v6.6.3 release introduced several new capabilities:

    • Script Management: timers.keepAlive() (globally available) to keep scripts active; engines.on('start/stop/error', callback) for global engine event listening; and a new release history feature.
    • Image Processing: images.detectMultiColors for multi-point color validation; images.matchFeatures/detectAndComputeFeatures for full-resolution image matching; images.compressToBytes for image compression to byte arrays; and images.downsample for pixel downsampling.
    • UI & Webview: ui.keepScreenOn to keep the screen awake when the UI has focus; ui.root (getter) to access the UI layout root container; and support for JsBridge-based Web page layouts in webview elements.
    • Layout Analysis: Support for detecting hidden controls.
  2. Core Features of AutoJs6

    master

    AutoJs6 provides a comprehensive suite of tools for Android automation:

    • JavaScript IDE: Includes code completion, variable renaming, and code formatting.
    • Automation: Supports operations based on Android Accessibility Services.
    • Floating Window Tools: Quick access to script recording/playback, package name/activity inspection, and layout analysis.
    • Selector API: Provides control traversal, information retrieval, and control manipulation (similar to UiAutomator).
    • Layout Analysis: Visual inspection of UI layouts (similar to Android Studio's LayoutInspector).
    • Recording: Supports recording user actions and replaying them.
    • Image Processing: Supports screenshots, saving screenshots, color finding, and image matching.
    • UI Development: Supports writing interfaces using E4X (ECMAScript for XML).
    • Packaging: Ability to package script files or projects into APK files.
    • Root Privileges: Extends functionality (clicks, swipes, recording, Shell) when Root access is available.
    • Integrations: Works as a Tasker plugin and supports desktop development via VSCode using the AutoJs6-VSCode-Extension.
  3. Key features of jieba-analysis

    master

    The jieba-analysis library (Java version) includes the following features:

    • Multiple Segmentation Modes: Supports Search and Index modes.
    • Text Normalization: Automatically converts full-width characters to half-width.
    • User Dictionary: Supports custom user dictionaries.
    • TF-IDF Keyword Extraction: New feature to extract keywords from text.
    • Performance Note: The latest snapshot versions have removed part-of-speech (POS) tagging to improve performance.
  4. Search for colors by name

    master

    You can search for colors using their names in two ways. All name-based searches are case-insensitive and ignore non-alphanumeric characters (like spaces, parentheses, or hyphens) during the matching process.

    1. Current Language: Simply type the color name in the interface's current language (e.g., rojo matches Rojo, Rojo oscuro, etc.).
    2. English Name: Prefix your query with $ to search using English color names, regardless of the current interface language (e.g., $red matches Rojo).
    rojo
    $red
    $blue50
  5. Search for colors by English name using '$'

    master

    Enable English color name search mode by prefixing your query with $. This allows you to search for colors using English keywords even if the display language is not English.

    Examples:

    • $red matches all colors containing "red" in their English name (e.g., "レッド", "オレンジレッド").
    • $blue50 matches colors like "ブルー (50)", "ブルー (500)", or "水色 (50)".
    $red
  6. Search by color name (current language)

    master

    Search using the color name in the current interface language. Non-alphabetic and non-numeric characters (spaces, parentheses, slashes, hyphens, etc.) are ignored during matching.

    Examples:

    • красный matches "Красный", "Кирпичный красный", "Оранжево-красный".
    • синий50 matches "Синий (50)" or "Синий (500)" because symbols are ignored, but it will not match "Синий серый (50)" because "серый" is a non-ignorable character.