JXA

by JXA-userland

JXA-userland / JXA

JavaScript for Automation(JXA) packages for TypeScript/Node.js.

152 Stars 8 Forks Last release: 19 days ago (v1.3.4) MIT License 85 Commits 16 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

JXA Build Status

JavaScript for Automation(JXA) packages.

auto complete example

Features

Packages

Example

If you want to improve your editor for JSX, use @jxa/global-type. You can just import

@jxa/global-type
and you can introduce typing and auto complete for JSX.

:memo: Your editor should support TypeScript. For more details, see TypeScript Editor Support

// Your .ts file require @jxa/global-type
import "@jxa/global-type";

// your JXA application const userName = Application("System Events").currentUser().name();

If you want to run JXA from Node.js, use @jxa/run.

import "@jxa/global-type";
import { run } from "@jxa/run";
export const currentUserName = () => {
    // This callback function is run as JXA
    return run(() => {
        const sys = Application("System Events");
        return sys.currentUser().name();
    });
};

// Main code is Node.js export const example = async () => { const userName = await currentUserName(); return User: ${userName}; };

For more details, see example/.

Contributing

Issue and PR is always welcome!

For more details, see CONTRIBUTING guide.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.