jxa-types
    Preparing search index...

    Interface ItunesApplication

    Application interface specific to iTunes/Music.

    interface ItunesApplication {
        includeStandardAdditions: boolean;
        strictCommandScope: boolean;
        strictParameterType: boolean;
        strictPropertyScope: boolean;
        activate(specifier?: any): void;
        add(paths: any[], args: { to?: LibraryPlaylist }): JXReadonlyArray<Item>;
        airplayEnabled(): boolean;
        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;
        converting(): boolean;
        currentStreamTitle(): string;
        currentStreamURL(): string;
        currentTrack(): Item;
        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>;
        eqEnabled(): boolean;
        fixedIndexing(): boolean;
        frontmost(): boolean;
        fullScreen(): boolean;
        id(): any;
        launch(): void;
        mute(): boolean;
        name(): string;
        parentOfClass(): any;
        playerPosition(): number;
        playerState(): | "stopped"
        | "playing"
        | "paused"
        | "fast forwarding"
        | "rewinding";
        propertiesOfClass(): JXReadonlyArray<any>;
        quit(saving?: "ask" | "yes" | "no"): void;
        refresh(track: FileTrack): void;
        running(): boolean;
        say(s: string): void;
        selection(): JXReadonlyArray<Item>;
        shuffleEnabled(): boolean;
        shuffleMode(): "songs" | "albums" | "groupings";
        songRepeat(): "off" | "one" | "all";
        soundVolume(): number;
        sources(): JXReadonlyArray<Source>;
        version(): string;
        visualsEnabled(): boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

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

    Methods

    • 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

    • Returns "stopped" | "playing" | "paused" | "fast forwarding" | "rewinding"