Skip to content

andrestubbe/FastUIA

Repository files navigation

FastUIA — Native Windows UI Automation API for Java

High-performance, native Windows UI Automation (UIA) for Java.

Build Java Platform License: MIT JitPack

FastUIA provides real-time native UI Automation for Java applications without the overhead of heavy frameworks.

// Quick Start — Example
import fastuia.FastUIA;
import fastuia.FastUIAElement;

public class Demo {
    public static void main(String[] args) {
        FastUIA uia = new FastUIA();
        
        // Get focused element
        FastUIAElement el = uia.getFocusedElement();
        
        if (el != null) {
            System.out.println("Focused: " + el.getName());
            System.out.println("Type:    " + el.getControlType());
            
            if (el.supportsValue()) {
                System.out.println("Value: " + el.getValue());
            }
        }
    }
}

Table of Contents


Key Features

  • 🚀 Native Performance — Direct UI Automation API access via JNI.
  • ⚡ Zero Overhead — No polling, purely event-driven callbacks.
  • 📦 Zero Dependencies — Just requires Java 17+ and Windows.
  • 🎯 Object-Oriented — Clean, type-safe API for elements and patterns.

Performance

FastJava modules require two dependencies: the module itself, and FastCore (which handles the cross-platform native library extraction).

Maven (JitPack)

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependencies>
    <!-- 1. The FastUIA Module -->
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>fastuia</artifactId>
        <version>0.1.0</version>
    </dependency>
    
    <!-- 2. FastCore (Required for native loading) -->
    <dependency>
        <groupId>com.github.andrestubbe</groupId>
        <artifactId>fastcore</artifactId>
        <version>0.1.0</version>
    </dependency>
</dependencies>

Gradle (JitPack)

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.andrestubbe:fastuia:0.1.0'
    implementation 'com.github.andrestubbe:fastcore:0.1.0'
}

API Reference (FastUIAElement)

Method Description
getName() Get the name of the UI element.
getControlType() Get the ControlType enum value.
getValue() / setValue(String) Access the ValuePattern if supported.
getSelection() / setSelection(String) Access the TextPattern if supported.
invoke() Trigger the default action (InvokePattern).
expand() / collapse() Control ExpandCollapsePattern.
getBoundingRect() Get the Rect (x, y, w, h).
getParent() / getFirstChild() Navigate the UI tree.
supportsValue() / supportsText() Check for pattern support.

Platform Support

Platform Status
Windows 10/11 (x64) ✅ Fully Supported
Linux 🚧 Planned
macOS 🚧 Planned

Building from Source

For detailed instructions on compiling the C++ JNI code and building the Maven FatJAR, see COMPILE.md.


License

MIT License — See LICENSE file for details.


Related Projects

  • FastCore — Native Library Loader for Java
  • FastWindow — High‑performance window management
  • FastRobot — Native input simulation

Made with ⚡ by Andre Stubbe

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors