jxa-types
    Preparing search index...

    Interface Application

    interface Application {
        includeStandardAdditions: boolean;
        strictCommandScope: boolean;
        strictParameterType: boolean;
        strictPropertyScope: boolean;
        activate(specifier?: any): void;
        chooseFromList(
            l: (string | number)[],
            args?: {
                cancelButtonName?: string;
                defaultItems?: (string | number)[];
                emptySelectionAllowed?: boolean;
                multipleSelectionsAllowed?: boolean;
                okButtonName?: string;
                withPrompt?: string;
                withTitle?: string;
            },
        ): false
        | (string | number)[];
        commandsOfClass(): any;
        displayDialog(
            message: string,
            args?: {
                buttons?: string[];
                cancelButton?: string | number;
                defaultAnswer?: string;
                defaultButton?: string | number;
                givingUpAfter?: number;
                hiddenAnswer?: boolean;
                withIcon?: string | number | Item;
                withTitle?: string;
            },
        ): DialogReply;
        displayNameForCommand(): string | null;
        displayNameForElementOfClass(): string | null;
        displayNameForPropertyOfClass(cls?: any): string | null;
        elementsOfClass(): JXReadonlyArray<any>;
        frontmost(): boolean;
        id(): any;
        launch(): void;
        name(): string;
        parentOfClass(): any;
        propertiesOfClass(): JXReadonlyArray<any>;
        quit(saving?: "ask" | "yes" | "no"): void;
        running(): boolean;
        say(s: string): void;
        version(): string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    includeStandardAdditions: boolean
    strictCommandScope: boolean
    strictParameterType: boolean
    strictPropertyScope: boolean

    Methods

    • Activate the application or the specified window.

      Parameters

      • Optionalspecifier: any

      Returns void

    • Displays a dialog with choices. If the user chooses to cancel, false is returned. Otherwise, a list of items selected is returned.

      Parameters

      • l: (string | number)[]
      • Optionalargs: {
            cancelButtonName?: string;
            defaultItems?: (string | number)[];
            emptySelectionAllowed?: boolean;
            multipleSelectionsAllowed?: boolean;
            okButtonName?: string;
            withPrompt?: string;
            withTitle?: string;
        }

      Returns false | (string | number)[]

    • Display a message, possibly with choices as buttons.

      Parameters

      • message: string
      • Optionalargs: {
            buttons?: string[];
            cancelButton?: string | number;
            defaultAnswer?: string;
            defaultButton?: string | number;
            givingUpAfter?: number;
            hiddenAnswer?: boolean;
            withIcon?: string | number | Item;
            withTitle?: string;
        }

      Returns DialogReply

    • Parameters

      • Optionalcls: any

      Returns string | null

    • Quit the application.

      Parameters

      • Optionalsaving: "ask" | "yes" | "no"

      Returns void